001package com.box.sdkgen.managers.shieldinformationbarriersegmentrestrictions; 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 013class CreateShieldInformationBarrierSegmentRestrictionRequestBodyShieldInformationBarrierSegmentField 014 extends SerializableObject { 015 016 /** The ID reference of the requesting shield information barrier segment. */ 017 protected String id; 018 019 /** The type of the shield barrier segment for this member. */ 020 @JsonDeserialize( 021 using = 022 CreateShieldInformationBarrierSegmentRestrictionRequestBodyShieldInformationBarrierSegmentTypeField 023 .CreateShieldInformationBarrierSegmentRestrictionRequestBodyShieldInformationBarrierSegmentTypeFieldDeserializer 024 .class) 025 @JsonSerialize( 026 using = 027 CreateShieldInformationBarrierSegmentRestrictionRequestBodyShieldInformationBarrierSegmentTypeField 028 .CreateShieldInformationBarrierSegmentRestrictionRequestBodyShieldInformationBarrierSegmentTypeFieldSerializer 029 .class) 030 protected EnumWrapper< 031 CreateShieldInformationBarrierSegmentRestrictionRequestBodyShieldInformationBarrierSegmentTypeField> 032 type; 033 034 public 035 CreateShieldInformationBarrierSegmentRestrictionRequestBodyShieldInformationBarrierSegmentField() { 036 super(); 037 } 038 039 protected 040 CreateShieldInformationBarrierSegmentRestrictionRequestBodyShieldInformationBarrierSegmentField( 041 Builder builder) { 042 super(); 043 this.id = builder.id; 044 this.type = builder.type; 045 markNullableFieldsAsSet(builder.getExplicitlySetNullableFields()); 046 } 047 048 public String getId() { 049 return id; 050 } 051 052 public EnumWrapper< 053 CreateShieldInformationBarrierSegmentRestrictionRequestBodyShieldInformationBarrierSegmentTypeField> 054 getType() { 055 return type; 056 } 057 058 @Override 059 public boolean equals(Object o) { 060 if (this == o) { 061 return true; 062 } 063 if (o == null || getClass() != o.getClass()) { 064 return false; 065 } 066 CreateShieldInformationBarrierSegmentRestrictionRequestBodyShieldInformationBarrierSegmentField 067 casted = 068 (CreateShieldInformationBarrierSegmentRestrictionRequestBodyShieldInformationBarrierSegmentField) 069 o; 070 return Objects.equals(id, casted.id) && Objects.equals(type, casted.type); 071 } 072 073 @Override 074 public int hashCode() { 075 return Objects.hash(id, type); 076 } 077 078 @Override 079 public String toString() { 080 return "CreateShieldInformationBarrierSegmentRestrictionRequestBodyShieldInformationBarrierSegmentField{" 081 + "id='" 082 + id 083 + '\'' 084 + ", " 085 + "type='" 086 + type 087 + '\'' 088 + "}"; 089 } 090 091 public static class Builder extends NullableFieldTracker { 092 093 protected String id; 094 095 protected EnumWrapper< 096 CreateShieldInformationBarrierSegmentRestrictionRequestBodyShieldInformationBarrierSegmentTypeField> 097 type; 098 099 public Builder id(String id) { 100 this.id = id; 101 return this; 102 } 103 104 public Builder type( 105 CreateShieldInformationBarrierSegmentRestrictionRequestBodyShieldInformationBarrierSegmentTypeField 106 type) { 107 this.type = 108 new EnumWrapper< 109 CreateShieldInformationBarrierSegmentRestrictionRequestBodyShieldInformationBarrierSegmentTypeField>( 110 type); 111 return this; 112 } 113 114 public Builder type( 115 EnumWrapper< 116 CreateShieldInformationBarrierSegmentRestrictionRequestBodyShieldInformationBarrierSegmentTypeField> 117 type) { 118 this.type = type; 119 return this; 120 } 121 122 public 123 CreateShieldInformationBarrierSegmentRestrictionRequestBodyShieldInformationBarrierSegmentField 124 build() { 125 return new CreateShieldInformationBarrierSegmentRestrictionRequestBodyShieldInformationBarrierSegmentField( 126 this); 127 } 128 } 129}