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