001package com.box.sdkgen.schemas.signrequests;
002
003import com.box.sdkgen.internal.Nullable;
004import com.box.sdkgen.internal.NullableFieldTracker;
005import com.box.sdkgen.internal.SerializableObject;
006import com.box.sdkgen.schemas.signrequest.SignRequest;
007import com.fasterxml.jackson.annotation.JsonFilter;
008import com.fasterxml.jackson.annotation.JsonProperty;
009import java.util.List;
010import java.util.Objects;
011
012/**
013 * A standard representation of a signature request, as returned from any Box Sign API endpoints by
014 * default.
015 */
016@JsonFilter("nullablePropertyFilter")
017public class SignRequests 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  /** A list of Box Sign requests. */
031  protected List<SignRequest> entries;
032
033  public SignRequests() {
034    super();
035  }
036
037  protected SignRequests(Builder builder) {
038    super();
039    this.limit = builder.limit;
040    this.nextMarker = builder.nextMarker;
041    this.entries = builder.entries;
042    markNullableFieldsAsSet(builder.getExplicitlySetNullableFields());
043  }
044
045  public Long getLimit() {
046    return limit;
047  }
048
049  public String getNextMarker() {
050    return nextMarker;
051  }
052
053  public List<SignRequest> getEntries() {
054    return entries;
055  }
056
057  @Override
058  public boolean equals(Object o) {
059    if (this == o) {
060      return true;
061    }
062    if (o == null || getClass() != o.getClass()) {
063      return false;
064    }
065    SignRequests casted = (SignRequests) o;
066    return Objects.equals(limit, casted.limit)
067        && Objects.equals(nextMarker, casted.nextMarker)
068        && Objects.equals(entries, casted.entries);
069  }
070
071  @Override
072  public int hashCode() {
073    return Objects.hash(limit, nextMarker, entries);
074  }
075
076  @Override
077  public String toString() {
078    return "SignRequests{"
079        + "limit='"
080        + limit
081        + '\''
082        + ", "
083        + "nextMarker='"
084        + nextMarker
085        + '\''
086        + ", "
087        + "entries='"
088        + entries
089        + '\''
090        + "}";
091  }
092
093  public static class Builder extends NullableFieldTracker {
094
095    protected Long limit;
096
097    protected String nextMarker;
098
099    protected List<SignRequest> entries;
100
101    public Builder limit(Long limit) {
102      this.limit = limit;
103      return this;
104    }
105
106    public Builder nextMarker(String nextMarker) {
107      this.nextMarker = nextMarker;
108      this.markNullableFieldAsSet("next_marker");
109      return this;
110    }
111
112    public Builder entries(List<SignRequest> entries) {
113      this.entries = entries;
114      return this;
115    }
116
117    public SignRequests build() {
118      return new SignRequests(this);
119    }
120  }
121}