001package com.box.sdkgen.schemas.shieldinformationbarriersegmentrestrictions;
002
003import com.box.sdkgen.internal.Nullable;
004import com.box.sdkgen.internal.NullableFieldTracker;
005import com.box.sdkgen.internal.SerializableObject;
006import com.box.sdkgen.schemas.shieldinformationbarriersegmentrestriction.ShieldInformationBarrierSegmentRestriction;
007import com.fasterxml.jackson.annotation.JsonFilter;
008import com.fasterxml.jackson.annotation.JsonProperty;
009import java.util.List;
010import java.util.Objects;
011
012/** List of shield information barrier segment restriction objects. */
013@JsonFilter("nullablePropertyFilter")
014public class ShieldInformationBarrierSegmentRestrictions extends SerializableObject {
015
016  /**
017   * The limit that was used for these entries. This will be the same as the `limit` query parameter
018   * unless that value exceeded the maximum value allowed. The maximum value varies by API.
019   */
020  protected Long limit;
021
022  /** The marker for the start of the next page of results. */
023  @JsonProperty("next_marker")
024  @Nullable
025  protected String nextMarker;
026
027  /** A list of shield information barrier segment restriction objects. */
028  protected List<ShieldInformationBarrierSegmentRestriction> entries;
029
030  public ShieldInformationBarrierSegmentRestrictions() {
031    super();
032  }
033
034  protected ShieldInformationBarrierSegmentRestrictions(Builder builder) {
035    super();
036    this.limit = builder.limit;
037    this.nextMarker = builder.nextMarker;
038    this.entries = builder.entries;
039    markNullableFieldsAsSet(builder.getExplicitlySetNullableFields());
040  }
041
042  public Long getLimit() {
043    return limit;
044  }
045
046  public String getNextMarker() {
047    return nextMarker;
048  }
049
050  public List<ShieldInformationBarrierSegmentRestriction> getEntries() {
051    return entries;
052  }
053
054  @Override
055  public boolean equals(Object o) {
056    if (this == o) {
057      return true;
058    }
059    if (o == null || getClass() != o.getClass()) {
060      return false;
061    }
062    ShieldInformationBarrierSegmentRestrictions casted =
063        (ShieldInformationBarrierSegmentRestrictions) o;
064    return Objects.equals(limit, casted.limit)
065        && Objects.equals(nextMarker, casted.nextMarker)
066        && Objects.equals(entries, casted.entries);
067  }
068
069  @Override
070  public int hashCode() {
071    return Objects.hash(limit, nextMarker, entries);
072  }
073
074  @Override
075  public String toString() {
076    return "ShieldInformationBarrierSegmentRestrictions{"
077        + "limit='"
078        + limit
079        + '\''
080        + ", "
081        + "nextMarker='"
082        + nextMarker
083        + '\''
084        + ", "
085        + "entries='"
086        + entries
087        + '\''
088        + "}";
089  }
090
091  public static class Builder extends NullableFieldTracker {
092
093    protected Long limit;
094
095    protected String nextMarker;
096
097    protected List<ShieldInformationBarrierSegmentRestriction> entries;
098
099    public Builder limit(Long limit) {
100      this.limit = limit;
101      return this;
102    }
103
104    public Builder nextMarker(String nextMarker) {
105      this.nextMarker = nextMarker;
106      this.markNullableFieldAsSet("next_marker");
107      return this;
108    }
109
110    public Builder entries(List<ShieldInformationBarrierSegmentRestriction> entries) {
111      this.entries = entries;
112      return this;
113    }
114
115    public ShieldInformationBarrierSegmentRestrictions build() {
116      return new ShieldInformationBarrierSegmentRestrictions(this);
117    }
118  }
119}