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