001package com.box.sdkgen.schemas.v2025r0.shieldlistminiv2025r0; 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.annotation.JsonProperty; 008import com.fasterxml.jackson.databind.annotation.JsonDeserialize; 009import com.fasterxml.jackson.databind.annotation.JsonSerialize; 010import java.util.Objects; 011 012/** A mini representation of a Shield List. */ 013@JsonFilter("nullablePropertyFilter") 014public class ShieldListMiniV2025R0 extends SerializableObject { 015 016 /** Unique global identifier for this list. */ 017 protected final String id; 018 019 /** The type of object. */ 020 @JsonDeserialize( 021 using = ShieldListMiniV2025R0TypeField.ShieldListMiniV2025R0TypeFieldDeserializer.class) 022 @JsonSerialize( 023 using = ShieldListMiniV2025R0TypeField.ShieldListMiniV2025R0TypeFieldSerializer.class) 024 protected EnumWrapper<ShieldListMiniV2025R0TypeField> type; 025 026 /** Name of Shield List. */ 027 protected final String name; 028 029 protected final ShieldListMiniV2025R0ContentField content; 030 031 public ShieldListMiniV2025R0( 032 @JsonProperty("id") String id, 033 @JsonProperty("name") String name, 034 @JsonProperty("content") ShieldListMiniV2025R0ContentField content) { 035 super(); 036 this.id = id; 037 this.name = name; 038 this.content = content; 039 this.type = 040 new EnumWrapper<ShieldListMiniV2025R0TypeField>(ShieldListMiniV2025R0TypeField.SHIELD_LIST); 041 } 042 043 protected ShieldListMiniV2025R0(Builder builder) { 044 super(); 045 this.id = builder.id; 046 this.type = builder.type; 047 this.name = builder.name; 048 this.content = builder.content; 049 markNullableFieldsAsSet(builder.getExplicitlySetNullableFields()); 050 } 051 052 public String getId() { 053 return id; 054 } 055 056 public EnumWrapper<ShieldListMiniV2025R0TypeField> getType() { 057 return type; 058 } 059 060 public String getName() { 061 return name; 062 } 063 064 public ShieldListMiniV2025R0ContentField getContent() { 065 return content; 066 } 067 068 @Override 069 public boolean equals(Object o) { 070 if (this == o) { 071 return true; 072 } 073 if (o == null || getClass() != o.getClass()) { 074 return false; 075 } 076 ShieldListMiniV2025R0 casted = (ShieldListMiniV2025R0) o; 077 return Objects.equals(id, casted.id) 078 && Objects.equals(type, casted.type) 079 && Objects.equals(name, casted.name) 080 && Objects.equals(content, casted.content); 081 } 082 083 @Override 084 public int hashCode() { 085 return Objects.hash(id, type, name, content); 086 } 087 088 @Override 089 public String toString() { 090 return "ShieldListMiniV2025R0{" 091 + "id='" 092 + id 093 + '\'' 094 + ", " 095 + "type='" 096 + type 097 + '\'' 098 + ", " 099 + "name='" 100 + name 101 + '\'' 102 + ", " 103 + "content='" 104 + content 105 + '\'' 106 + "}"; 107 } 108 109 public static class Builder extends NullableFieldTracker { 110 111 protected final String id; 112 113 protected EnumWrapper<ShieldListMiniV2025R0TypeField> type; 114 115 protected final String name; 116 117 protected final ShieldListMiniV2025R0ContentField content; 118 119 public Builder(String id, String name, ShieldListMiniV2025R0ContentField content) { 120 super(); 121 this.id = id; 122 this.name = name; 123 this.content = content; 124 } 125 126 public Builder type(ShieldListMiniV2025R0TypeField type) { 127 this.type = new EnumWrapper<ShieldListMiniV2025R0TypeField>(type); 128 return this; 129 } 130 131 public Builder type(EnumWrapper<ShieldListMiniV2025R0TypeField> type) { 132 this.type = type; 133 return this; 134 } 135 136 public ShieldListMiniV2025R0 build() { 137 if (this.type == null) { 138 this.type = 139 new EnumWrapper<ShieldListMiniV2025R0TypeField>( 140 ShieldListMiniV2025R0TypeField.SHIELD_LIST); 141 } 142 return new ShieldListMiniV2025R0(this); 143 } 144 } 145}