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