001package com.box.sdkgen.schemas.v2025r0.shieldlistcontentintegrationv2025r0;
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.List;
011import java.util.Objects;
012
013/** Representation of content of a Shield List that contains integrations data. */
014@JsonFilter("nullablePropertyFilter")
015public class ShieldListContentIntegrationV2025R0 extends SerializableObject {
016
017  /** The type of content in the shield list. */
018  @JsonDeserialize(
019      using =
020          ShieldListContentIntegrationV2025R0TypeField
021              .ShieldListContentIntegrationV2025R0TypeFieldDeserializer.class)
022  @JsonSerialize(
023      using =
024          ShieldListContentIntegrationV2025R0TypeField
025              .ShieldListContentIntegrationV2025R0TypeFieldSerializer.class)
026  protected EnumWrapper<ShieldListContentIntegrationV2025R0TypeField> type;
027
028  /** List of integration. */
029  protected final List<ShieldListContentIntegrationV2025R0IntegrationsField> integrations;
030
031  public ShieldListContentIntegrationV2025R0(
032      @JsonProperty("integrations")
033          List<ShieldListContentIntegrationV2025R0IntegrationsField> integrations) {
034    super();
035    this.integrations = integrations;
036    this.type =
037        new EnumWrapper<ShieldListContentIntegrationV2025R0TypeField>(
038            ShieldListContentIntegrationV2025R0TypeField.INTEGRATION);
039  }
040
041  protected ShieldListContentIntegrationV2025R0(Builder builder) {
042    super();
043    this.type = builder.type;
044    this.integrations = builder.integrations;
045    markNullableFieldsAsSet(builder.getExplicitlySetNullableFields());
046  }
047
048  public EnumWrapper<ShieldListContentIntegrationV2025R0TypeField> getType() {
049    return type;
050  }
051
052  public List<ShieldListContentIntegrationV2025R0IntegrationsField> getIntegrations() {
053    return integrations;
054  }
055
056  @Override
057  public boolean equals(Object o) {
058    if (this == o) {
059      return true;
060    }
061    if (o == null || getClass() != o.getClass()) {
062      return false;
063    }
064    ShieldListContentIntegrationV2025R0 casted = (ShieldListContentIntegrationV2025R0) o;
065    return Objects.equals(type, casted.type) && Objects.equals(integrations, casted.integrations);
066  }
067
068  @Override
069  public int hashCode() {
070    return Objects.hash(type, integrations);
071  }
072
073  @Override
074  public String toString() {
075    return "ShieldListContentIntegrationV2025R0{"
076        + "type='"
077        + type
078        + '\''
079        + ", "
080        + "integrations='"
081        + integrations
082        + '\''
083        + "}";
084  }
085
086  public static class Builder extends NullableFieldTracker {
087
088    protected EnumWrapper<ShieldListContentIntegrationV2025R0TypeField> type;
089
090    protected final List<ShieldListContentIntegrationV2025R0IntegrationsField> integrations;
091
092    public Builder(List<ShieldListContentIntegrationV2025R0IntegrationsField> integrations) {
093      super();
094      this.integrations = integrations;
095    }
096
097    public Builder type(ShieldListContentIntegrationV2025R0TypeField type) {
098      this.type = new EnumWrapper<ShieldListContentIntegrationV2025R0TypeField>(type);
099      return this;
100    }
101
102    public Builder type(EnumWrapper<ShieldListContentIntegrationV2025R0TypeField> type) {
103      this.type = type;
104      return this;
105    }
106
107    public ShieldListContentIntegrationV2025R0 build() {
108      if (this.type == null) {
109        this.type =
110            new EnumWrapper<ShieldListContentIntegrationV2025R0TypeField>(
111                ShieldListContentIntegrationV2025R0TypeField.INTEGRATION);
112      }
113      return new ShieldListContentIntegrationV2025R0(this);
114    }
115  }
116}