001package com.box.sdkgen.schemas.appitemassociations;
002
003import com.box.sdkgen.internal.Nullable;
004import com.box.sdkgen.internal.NullableFieldTracker;
005import com.box.sdkgen.internal.SerializableObject;
006import com.box.sdkgen.schemas.appitemassociation.AppItemAssociation;
007import com.fasterxml.jackson.annotation.JsonFilter;
008import com.fasterxml.jackson.annotation.JsonProperty;
009import java.util.List;
010import java.util.Objects;
011
012/** A list of app item associations. */
013@JsonFilter("nullablePropertyFilter")
014public class AppItemAssociations 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  /** The marker for the start of the previous page of results. */
028  @JsonProperty("prev_marker")
029  @Nullable
030  protected String prevMarker;
031
032  protected List<AppItemAssociation> entries;
033
034  public AppItemAssociations() {
035    super();
036  }
037
038  protected AppItemAssociations(Builder builder) {
039    super();
040    this.limit = builder.limit;
041    this.nextMarker = builder.nextMarker;
042    this.prevMarker = builder.prevMarker;
043    this.entries = builder.entries;
044    markNullableFieldsAsSet(builder.getExplicitlySetNullableFields());
045  }
046
047  public Long getLimit() {
048    return limit;
049  }
050
051  public String getNextMarker() {
052    return nextMarker;
053  }
054
055  public String getPrevMarker() {
056    return prevMarker;
057  }
058
059  public List<AppItemAssociation> getEntries() {
060    return entries;
061  }
062
063  @Override
064  public boolean equals(Object o) {
065    if (this == o) {
066      return true;
067    }
068    if (o == null || getClass() != o.getClass()) {
069      return false;
070    }
071    AppItemAssociations casted = (AppItemAssociations) o;
072    return Objects.equals(limit, casted.limit)
073        && Objects.equals(nextMarker, casted.nextMarker)
074        && Objects.equals(prevMarker, casted.prevMarker)
075        && Objects.equals(entries, casted.entries);
076  }
077
078  @Override
079  public int hashCode() {
080    return Objects.hash(limit, nextMarker, prevMarker, entries);
081  }
082
083  @Override
084  public String toString() {
085    return "AppItemAssociations{"
086        + "limit='"
087        + limit
088        + '\''
089        + ", "
090        + "nextMarker='"
091        + nextMarker
092        + '\''
093        + ", "
094        + "prevMarker='"
095        + prevMarker
096        + '\''
097        + ", "
098        + "entries='"
099        + entries
100        + '\''
101        + "}";
102  }
103
104  public static class Builder extends NullableFieldTracker {
105
106    protected Long limit;
107
108    protected String nextMarker;
109
110    protected String prevMarker;
111
112    protected List<AppItemAssociation> entries;
113
114    public Builder limit(Long limit) {
115      this.limit = limit;
116      return this;
117    }
118
119    public Builder nextMarker(String nextMarker) {
120      this.nextMarker = nextMarker;
121      this.markNullableFieldAsSet("next_marker");
122      return this;
123    }
124
125    public Builder prevMarker(String prevMarker) {
126      this.prevMarker = prevMarker;
127      this.markNullableFieldAsSet("prev_marker");
128      return this;
129    }
130
131    public Builder entries(List<AppItemAssociation> entries) {
132      this.entries = entries;
133      return this;
134    }
135
136    public AppItemAssociations build() {
137      return new AppItemAssociations(this);
138    }
139  }
140}