001package com.box.sdkgen.schemas.v2025r0.shieldlistv2025r0;
002
003import com.box.sdkgen.internal.NullableFieldTracker;
004import com.box.sdkgen.internal.SerializableObject;
005import com.box.sdkgen.internal.utils.DateTimeUtils;
006import com.box.sdkgen.schemas.v2025r0.enterprisereferencev2025r0.EnterpriseReferenceV2025R0;
007import com.box.sdkgen.schemas.v2025r0.shieldlistcontentcountryv2025r0.ShieldListContentCountryV2025R0;
008import com.box.sdkgen.schemas.v2025r0.shieldlistcontentdomainv2025r0.ShieldListContentDomainV2025R0;
009import com.box.sdkgen.schemas.v2025r0.shieldlistcontentemailv2025r0.ShieldListContentEmailV2025R0;
010import com.box.sdkgen.schemas.v2025r0.shieldlistcontentintegrationv2025r0.ShieldListContentIntegrationV2025R0;
011import com.box.sdkgen.schemas.v2025r0.shieldlistcontentipv2025r0.ShieldListContentIpV2025R0;
012import com.box.sdkgen.schemas.v2025r0.shieldlistcontentv2025r0.ShieldListContentV2025R0;
013import com.fasterxml.jackson.annotation.JsonFilter;
014import com.fasterxml.jackson.annotation.JsonProperty;
015import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
016import com.fasterxml.jackson.databind.annotation.JsonSerialize;
017import java.time.OffsetDateTime;
018import java.util.Objects;
019
020/** A standard representation of a Shield List. */
021@JsonFilter("nullablePropertyFilter")
022public class ShieldListV2025R0 extends SerializableObject {
023
024  /** Unique identifier for the shield list. */
025  protected final String id;
026
027  /** Type of the object. */
028  protected final String type;
029
030  /** Name of the shield list. */
031  protected final String name;
032
033  protected final EnterpriseReferenceV2025R0 enterprise;
034
035  /** Description of Shield List. */
036  protected String description;
037
038  /** ISO date time string when this shield list object was created. */
039  @JsonProperty("created_at")
040  @JsonSerialize(using = DateTimeUtils.DateTimeSerializer.class)
041  @JsonDeserialize(using = DateTimeUtils.DateTimeDeserializer.class)
042  protected final OffsetDateTime createdAt;
043
044  /** ISO date time string when this shield list object was updated. */
045  @JsonProperty("updated_at")
046  @JsonSerialize(using = DateTimeUtils.DateTimeSerializer.class)
047  @JsonDeserialize(using = DateTimeUtils.DateTimeDeserializer.class)
048  protected final OffsetDateTime updatedAt;
049
050  protected final ShieldListContentV2025R0 content;
051
052  public ShieldListV2025R0(
053      String id,
054      String type,
055      String name,
056      EnterpriseReferenceV2025R0 enterprise,
057      OffsetDateTime createdAt,
058      OffsetDateTime updatedAt,
059      ShieldListContentCountryV2025R0 content) {
060    super();
061    this.id = id;
062    this.type = type;
063    this.name = name;
064    this.enterprise = enterprise;
065    this.createdAt = createdAt;
066    this.updatedAt = updatedAt;
067    this.content = new ShieldListContentV2025R0(content);
068  }
069
070  public ShieldListV2025R0(
071      String id,
072      String type,
073      String name,
074      EnterpriseReferenceV2025R0 enterprise,
075      OffsetDateTime createdAt,
076      OffsetDateTime updatedAt,
077      ShieldListContentDomainV2025R0 content) {
078    super();
079    this.id = id;
080    this.type = type;
081    this.name = name;
082    this.enterprise = enterprise;
083    this.createdAt = createdAt;
084    this.updatedAt = updatedAt;
085    this.content = new ShieldListContentV2025R0(content);
086  }
087
088  public ShieldListV2025R0(
089      String id,
090      String type,
091      String name,
092      EnterpriseReferenceV2025R0 enterprise,
093      OffsetDateTime createdAt,
094      OffsetDateTime updatedAt,
095      ShieldListContentEmailV2025R0 content) {
096    super();
097    this.id = id;
098    this.type = type;
099    this.name = name;
100    this.enterprise = enterprise;
101    this.createdAt = createdAt;
102    this.updatedAt = updatedAt;
103    this.content = new ShieldListContentV2025R0(content);
104  }
105
106  public ShieldListV2025R0(
107      String id,
108      String type,
109      String name,
110      EnterpriseReferenceV2025R0 enterprise,
111      OffsetDateTime createdAt,
112      OffsetDateTime updatedAt,
113      ShieldListContentIpV2025R0 content) {
114    super();
115    this.id = id;
116    this.type = type;
117    this.name = name;
118    this.enterprise = enterprise;
119    this.createdAt = createdAt;
120    this.updatedAt = updatedAt;
121    this.content = new ShieldListContentV2025R0(content);
122  }
123
124  public ShieldListV2025R0(
125      String id,
126      String type,
127      String name,
128      EnterpriseReferenceV2025R0 enterprise,
129      OffsetDateTime createdAt,
130      OffsetDateTime updatedAt,
131      ShieldListContentIntegrationV2025R0 content) {
132    super();
133    this.id = id;
134    this.type = type;
135    this.name = name;
136    this.enterprise = enterprise;
137    this.createdAt = createdAt;
138    this.updatedAt = updatedAt;
139    this.content = new ShieldListContentV2025R0(content);
140  }
141
142  public ShieldListV2025R0(
143      @JsonProperty("id") String id,
144      @JsonProperty("type") String type,
145      @JsonProperty("name") String name,
146      @JsonProperty("enterprise") EnterpriseReferenceV2025R0 enterprise,
147      @JsonProperty("created_at") OffsetDateTime createdAt,
148      @JsonProperty("updated_at") OffsetDateTime updatedAt,
149      @JsonProperty("content") ShieldListContentV2025R0 content) {
150    super();
151    this.id = id;
152    this.type = type;
153    this.name = name;
154    this.enterprise = enterprise;
155    this.createdAt = createdAt;
156    this.updatedAt = updatedAt;
157    this.content = content;
158  }
159
160  protected ShieldListV2025R0(Builder builder) {
161    super();
162    this.id = builder.id;
163    this.type = builder.type;
164    this.name = builder.name;
165    this.enterprise = builder.enterprise;
166    this.description = builder.description;
167    this.createdAt = builder.createdAt;
168    this.updatedAt = builder.updatedAt;
169    this.content = builder.content;
170    markNullableFieldsAsSet(builder.getExplicitlySetNullableFields());
171  }
172
173  public String getId() {
174    return id;
175  }
176
177  public String getType() {
178    return type;
179  }
180
181  public String getName() {
182    return name;
183  }
184
185  public EnterpriseReferenceV2025R0 getEnterprise() {
186    return enterprise;
187  }
188
189  public String getDescription() {
190    return description;
191  }
192
193  public OffsetDateTime getCreatedAt() {
194    return createdAt;
195  }
196
197  public OffsetDateTime getUpdatedAt() {
198    return updatedAt;
199  }
200
201  public ShieldListContentV2025R0 getContent() {
202    return content;
203  }
204
205  @Override
206  public boolean equals(Object o) {
207    if (this == o) {
208      return true;
209    }
210    if (o == null || getClass() != o.getClass()) {
211      return false;
212    }
213    ShieldListV2025R0 casted = (ShieldListV2025R0) o;
214    return Objects.equals(id, casted.id)
215        && Objects.equals(type, casted.type)
216        && Objects.equals(name, casted.name)
217        && Objects.equals(enterprise, casted.enterprise)
218        && Objects.equals(description, casted.description)
219        && Objects.equals(createdAt, casted.createdAt)
220        && Objects.equals(updatedAt, casted.updatedAt)
221        && Objects.equals(content, casted.content);
222  }
223
224  @Override
225  public int hashCode() {
226    return Objects.hash(id, type, name, enterprise, description, createdAt, updatedAt, content);
227  }
228
229  @Override
230  public String toString() {
231    return "ShieldListV2025R0{"
232        + "id='"
233        + id
234        + '\''
235        + ", "
236        + "type='"
237        + type
238        + '\''
239        + ", "
240        + "name='"
241        + name
242        + '\''
243        + ", "
244        + "enterprise='"
245        + enterprise
246        + '\''
247        + ", "
248        + "description='"
249        + description
250        + '\''
251        + ", "
252        + "createdAt='"
253        + createdAt
254        + '\''
255        + ", "
256        + "updatedAt='"
257        + updatedAt
258        + '\''
259        + ", "
260        + "content='"
261        + content
262        + '\''
263        + "}";
264  }
265
266  public static class Builder extends NullableFieldTracker {
267
268    protected final String id;
269
270    protected final String type;
271
272    protected final String name;
273
274    protected final EnterpriseReferenceV2025R0 enterprise;
275
276    protected String description;
277
278    protected final OffsetDateTime createdAt;
279
280    protected final OffsetDateTime updatedAt;
281
282    protected final ShieldListContentV2025R0 content;
283
284    public Builder(
285        String id,
286        String type,
287        String name,
288        EnterpriseReferenceV2025R0 enterprise,
289        OffsetDateTime createdAt,
290        OffsetDateTime updatedAt,
291        ShieldListContentCountryV2025R0 content) {
292      super();
293      this.id = id;
294      this.type = type;
295      this.name = name;
296      this.enterprise = enterprise;
297      this.createdAt = createdAt;
298      this.updatedAt = updatedAt;
299      this.content = new ShieldListContentV2025R0(content);
300    }
301
302    public Builder(
303        String id,
304        String type,
305        String name,
306        EnterpriseReferenceV2025R0 enterprise,
307        OffsetDateTime createdAt,
308        OffsetDateTime updatedAt,
309        ShieldListContentDomainV2025R0 content) {
310      super();
311      this.id = id;
312      this.type = type;
313      this.name = name;
314      this.enterprise = enterprise;
315      this.createdAt = createdAt;
316      this.updatedAt = updatedAt;
317      this.content = new ShieldListContentV2025R0(content);
318    }
319
320    public Builder(
321        String id,
322        String type,
323        String name,
324        EnterpriseReferenceV2025R0 enterprise,
325        OffsetDateTime createdAt,
326        OffsetDateTime updatedAt,
327        ShieldListContentEmailV2025R0 content) {
328      super();
329      this.id = id;
330      this.type = type;
331      this.name = name;
332      this.enterprise = enterprise;
333      this.createdAt = createdAt;
334      this.updatedAt = updatedAt;
335      this.content = new ShieldListContentV2025R0(content);
336    }
337
338    public Builder(
339        String id,
340        String type,
341        String name,
342        EnterpriseReferenceV2025R0 enterprise,
343        OffsetDateTime createdAt,
344        OffsetDateTime updatedAt,
345        ShieldListContentIpV2025R0 content) {
346      super();
347      this.id = id;
348      this.type = type;
349      this.name = name;
350      this.enterprise = enterprise;
351      this.createdAt = createdAt;
352      this.updatedAt = updatedAt;
353      this.content = new ShieldListContentV2025R0(content);
354    }
355
356    public Builder(
357        String id,
358        String type,
359        String name,
360        EnterpriseReferenceV2025R0 enterprise,
361        OffsetDateTime createdAt,
362        OffsetDateTime updatedAt,
363        ShieldListContentIntegrationV2025R0 content) {
364      super();
365      this.id = id;
366      this.type = type;
367      this.name = name;
368      this.enterprise = enterprise;
369      this.createdAt = createdAt;
370      this.updatedAt = updatedAt;
371      this.content = new ShieldListContentV2025R0(content);
372    }
373
374    public Builder(
375        String id,
376        String type,
377        String name,
378        EnterpriseReferenceV2025R0 enterprise,
379        OffsetDateTime createdAt,
380        OffsetDateTime updatedAt,
381        ShieldListContentV2025R0 content) {
382      super();
383      this.id = id;
384      this.type = type;
385      this.name = name;
386      this.enterprise = enterprise;
387      this.createdAt = createdAt;
388      this.updatedAt = updatedAt;
389      this.content = content;
390    }
391
392    public Builder description(String description) {
393      this.description = description;
394      return this;
395    }
396
397    public ShieldListV2025R0 build() {
398      return new ShieldListV2025R0(this);
399    }
400  }
401}