001package com.box.sdkgen.schemas.collaborationallowlistentry; 002 003import com.box.sdkgen.internal.NullableFieldTracker; 004import com.box.sdkgen.internal.SerializableObject; 005import com.box.sdkgen.serialization.json.EnumWrapper; 006import com.fasterxml.jackson.annotation.JsonFilter; 007import com.fasterxml.jackson.databind.annotation.JsonDeserialize; 008import com.fasterxml.jackson.databind.annotation.JsonSerialize; 009import java.util.Objects; 010 011@JsonFilter("nullablePropertyFilter") 012public class CollaborationAllowlistEntryEnterpriseField extends SerializableObject { 013 014 /** The unique identifier for this enterprise. */ 015 protected String id; 016 017 /** The value will always be `enterprise`. */ 018 @JsonDeserialize( 019 using = 020 CollaborationAllowlistEntryEnterpriseTypeField 021 .CollaborationAllowlistEntryEnterpriseTypeFieldDeserializer.class) 022 @JsonSerialize( 023 using = 024 CollaborationAllowlistEntryEnterpriseTypeField 025 .CollaborationAllowlistEntryEnterpriseTypeFieldSerializer.class) 026 protected EnumWrapper<CollaborationAllowlistEntryEnterpriseTypeField> type; 027 028 /** The name of the enterprise. */ 029 protected String name; 030 031 public CollaborationAllowlistEntryEnterpriseField() { 032 super(); 033 } 034 035 protected CollaborationAllowlistEntryEnterpriseField(Builder builder) { 036 super(); 037 this.id = builder.id; 038 this.type = builder.type; 039 this.name = builder.name; 040 markNullableFieldsAsSet(builder.getExplicitlySetNullableFields()); 041 } 042 043 public String getId() { 044 return id; 045 } 046 047 public EnumWrapper<CollaborationAllowlistEntryEnterpriseTypeField> getType() { 048 return type; 049 } 050 051 public String getName() { 052 return name; 053 } 054 055 @Override 056 public boolean equals(Object o) { 057 if (this == o) { 058 return true; 059 } 060 if (o == null || getClass() != o.getClass()) { 061 return false; 062 } 063 CollaborationAllowlistEntryEnterpriseField casted = 064 (CollaborationAllowlistEntryEnterpriseField) o; 065 return Objects.equals(id, casted.id) 066 && Objects.equals(type, casted.type) 067 && Objects.equals(name, casted.name); 068 } 069 070 @Override 071 public int hashCode() { 072 return Objects.hash(id, type, name); 073 } 074 075 @Override 076 public String toString() { 077 return "CollaborationAllowlistEntryEnterpriseField{" 078 + "id='" 079 + id 080 + '\'' 081 + ", " 082 + "type='" 083 + type 084 + '\'' 085 + ", " 086 + "name='" 087 + name 088 + '\'' 089 + "}"; 090 } 091 092 public static class Builder extends NullableFieldTracker { 093 094 protected String id; 095 096 protected EnumWrapper<CollaborationAllowlistEntryEnterpriseTypeField> type; 097 098 protected String name; 099 100 public Builder id(String id) { 101 this.id = id; 102 return this; 103 } 104 105 public Builder type(CollaborationAllowlistEntryEnterpriseTypeField type) { 106 this.type = new EnumWrapper<CollaborationAllowlistEntryEnterpriseTypeField>(type); 107 return this; 108 } 109 110 public Builder type(EnumWrapper<CollaborationAllowlistEntryEnterpriseTypeField> type) { 111 this.type = type; 112 return this; 113 } 114 115 public Builder name(String name) { 116 this.name = name; 117 return this; 118 } 119 120 public CollaborationAllowlistEntryEnterpriseField build() { 121 return new CollaborationAllowlistEntryEnterpriseField(this); 122 } 123 } 124}