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