001package com.box.sdkgen.schemas.v2025r0.shieldlistsupdatev2025r0;
002
003import com.box.sdkgen.internal.NullableFieldTracker;
004import com.box.sdkgen.internal.SerializableObject;
005import com.box.sdkgen.schemas.v2025r0.shieldlistcontentcountryv2025r0.ShieldListContentCountryV2025R0;
006import com.box.sdkgen.schemas.v2025r0.shieldlistcontentdomainv2025r0.ShieldListContentDomainV2025R0;
007import com.box.sdkgen.schemas.v2025r0.shieldlistcontentemailv2025r0.ShieldListContentEmailV2025R0;
008import com.box.sdkgen.schemas.v2025r0.shieldlistcontentipv2025r0.ShieldListContentIpV2025R0;
009import com.box.sdkgen.schemas.v2025r0.shieldlistcontentrequestv2025r0.ShieldListContentRequestV2025R0;
010import com.fasterxml.jackson.annotation.JsonFilter;
011import com.fasterxml.jackson.annotation.JsonProperty;
012import java.util.Objects;
013
014/** The schema for Shield List update request. */
015@JsonFilter("nullablePropertyFilter")
016public class ShieldListsUpdateV2025R0 extends SerializableObject {
017
018  /** The name of the shield list. */
019  protected final String name;
020
021  /** Optional description of Shield List. */
022  protected String description;
023
024  protected final ShieldListContentRequestV2025R0 content;
025
026  public ShieldListsUpdateV2025R0(String name, ShieldListContentCountryV2025R0 content) {
027    super();
028    this.name = name;
029    this.content = new ShieldListContentRequestV2025R0(content);
030  }
031
032  public ShieldListsUpdateV2025R0(String name, ShieldListContentDomainV2025R0 content) {
033    super();
034    this.name = name;
035    this.content = new ShieldListContentRequestV2025R0(content);
036  }
037
038  public ShieldListsUpdateV2025R0(String name, ShieldListContentEmailV2025R0 content) {
039    super();
040    this.name = name;
041    this.content = new ShieldListContentRequestV2025R0(content);
042  }
043
044  public ShieldListsUpdateV2025R0(String name, ShieldListContentIpV2025R0 content) {
045    super();
046    this.name = name;
047    this.content = new ShieldListContentRequestV2025R0(content);
048  }
049
050  public ShieldListsUpdateV2025R0(
051      @JsonProperty("name") String name,
052      @JsonProperty("content") ShieldListContentRequestV2025R0 content) {
053    super();
054    this.name = name;
055    this.content = content;
056  }
057
058  protected ShieldListsUpdateV2025R0(Builder builder) {
059    super();
060    this.name = builder.name;
061    this.description = builder.description;
062    this.content = builder.content;
063    markNullableFieldsAsSet(builder.getExplicitlySetNullableFields());
064  }
065
066  public String getName() {
067    return name;
068  }
069
070  public String getDescription() {
071    return description;
072  }
073
074  public ShieldListContentRequestV2025R0 getContent() {
075    return content;
076  }
077
078  @Override
079  public boolean equals(Object o) {
080    if (this == o) {
081      return true;
082    }
083    if (o == null || getClass() != o.getClass()) {
084      return false;
085    }
086    ShieldListsUpdateV2025R0 casted = (ShieldListsUpdateV2025R0) o;
087    return Objects.equals(name, casted.name)
088        && Objects.equals(description, casted.description)
089        && Objects.equals(content, casted.content);
090  }
091
092  @Override
093  public int hashCode() {
094    return Objects.hash(name, description, content);
095  }
096
097  @Override
098  public String toString() {
099    return "ShieldListsUpdateV2025R0{"
100        + "name='"
101        + name
102        + '\''
103        + ", "
104        + "description='"
105        + description
106        + '\''
107        + ", "
108        + "content='"
109        + content
110        + '\''
111        + "}";
112  }
113
114  public static class Builder extends NullableFieldTracker {
115
116    protected final String name;
117
118    protected String description;
119
120    protected final ShieldListContentRequestV2025R0 content;
121
122    public Builder(String name, ShieldListContentCountryV2025R0 content) {
123      super();
124      this.name = name;
125      this.content = new ShieldListContentRequestV2025R0(content);
126    }
127
128    public Builder(String name, ShieldListContentDomainV2025R0 content) {
129      super();
130      this.name = name;
131      this.content = new ShieldListContentRequestV2025R0(content);
132    }
133
134    public Builder(String name, ShieldListContentEmailV2025R0 content) {
135      super();
136      this.name = name;
137      this.content = new ShieldListContentRequestV2025R0(content);
138    }
139
140    public Builder(String name, ShieldListContentIpV2025R0 content) {
141      super();
142      this.name = name;
143      this.content = new ShieldListContentRequestV2025R0(content);
144    }
145
146    public Builder(String name, ShieldListContentRequestV2025R0 content) {
147      super();
148      this.name = name;
149      this.content = content;
150    }
151
152    public Builder description(String description) {
153      this.description = description;
154      return this;
155    }
156
157    public ShieldListsUpdateV2025R0 build() {
158      return new ShieldListsUpdateV2025R0(this);
159    }
160  }
161}