001package com.box.sdkgen.managers.trasheditems;
002
003import com.box.sdkgen.serialization.json.EnumWrapper;
004import java.util.List;
005
006public class GetTrashedItemsQueryParams {
007
008  /**
009   * A comma-separated list of attributes to include in the response. This can be used to request
010   * fields that are not normally returned in a standard response.
011   *
012   * <p>Be aware that specifying this parameter will have the effect that none of the standard
013   * fields are returned in the response unless explicitly specified, instead only fields for the
014   * mini representation are returned, additional to the fields requested.
015   */
016  public List<String> fields;
017
018  /** The maximum number of items to return per page. */
019  public Long limit;
020
021  /**
022   * The offset of the item at which to begin the response.
023   *
024   * <p>Queries with offset parameter value exceeding 10000 will be rejected with a 400 response.
025   */
026  public Long offset;
027
028  /**
029   * Specifies whether to use marker-based pagination instead of offset-based pagination. Only one
030   * pagination method can be used at a time.
031   *
032   * <p>By setting this value to true, the API will return a `marker` field that can be passed as a
033   * parameter to this endpoint to get the next page of the response.
034   */
035  public Boolean usemarker;
036
037  /**
038   * Defines the position marker at which to begin returning results. This is used when paginating
039   * using marker-based pagination.
040   *
041   * <p>This requires `usemarker` to be set to `true`.
042   */
043  public String marker;
044
045  /**
046   * The direction to sort results in. This can be either in alphabetical ascending (`ASC`) or
047   * descending (`DESC`) order.
048   */
049  public EnumWrapper<GetTrashedItemsQueryParamsDirectionField> direction;
050
051  /**
052   * Defines the **second** attribute by which items are sorted.
053   *
054   * <p>Items are always sorted by their `type` first, with folders listed before files, and files
055   * listed before web links.
056   *
057   * <p>This parameter is not supported when using marker-based pagination.
058   */
059  public EnumWrapper<GetTrashedItemsQueryParamsSortField> sort;
060
061  public GetTrashedItemsQueryParams() {}
062
063  protected GetTrashedItemsQueryParams(Builder builder) {
064    this.fields = builder.fields;
065    this.limit = builder.limit;
066    this.offset = builder.offset;
067    this.usemarker = builder.usemarker;
068    this.marker = builder.marker;
069    this.direction = builder.direction;
070    this.sort = builder.sort;
071  }
072
073  public List<String> getFields() {
074    return fields;
075  }
076
077  public Long getLimit() {
078    return limit;
079  }
080
081  public Long getOffset() {
082    return offset;
083  }
084
085  public Boolean getUsemarker() {
086    return usemarker;
087  }
088
089  public String getMarker() {
090    return marker;
091  }
092
093  public EnumWrapper<GetTrashedItemsQueryParamsDirectionField> getDirection() {
094    return direction;
095  }
096
097  public EnumWrapper<GetTrashedItemsQueryParamsSortField> getSort() {
098    return sort;
099  }
100
101  public static class Builder {
102
103    protected List<String> fields;
104
105    protected Long limit;
106
107    protected Long offset;
108
109    protected Boolean usemarker;
110
111    protected String marker;
112
113    protected EnumWrapper<GetTrashedItemsQueryParamsDirectionField> direction;
114
115    protected EnumWrapper<GetTrashedItemsQueryParamsSortField> sort;
116
117    public Builder fields(List<String> fields) {
118      this.fields = fields;
119      return this;
120    }
121
122    public Builder limit(Long limit) {
123      this.limit = limit;
124      return this;
125    }
126
127    public Builder offset(Long offset) {
128      this.offset = offset;
129      return this;
130    }
131
132    public Builder usemarker(Boolean usemarker) {
133      this.usemarker = usemarker;
134      return this;
135    }
136
137    public Builder marker(String marker) {
138      this.marker = marker;
139      return this;
140    }
141
142    public Builder direction(GetTrashedItemsQueryParamsDirectionField direction) {
143      this.direction = new EnumWrapper<GetTrashedItemsQueryParamsDirectionField>(direction);
144      return this;
145    }
146
147    public Builder direction(EnumWrapper<GetTrashedItemsQueryParamsDirectionField> direction) {
148      this.direction = direction;
149      return this;
150    }
151
152    public Builder sort(GetTrashedItemsQueryParamsSortField sort) {
153      this.sort = new EnumWrapper<GetTrashedItemsQueryParamsSortField>(sort);
154      return this;
155    }
156
157    public Builder sort(EnumWrapper<GetTrashedItemsQueryParamsSortField> sort) {
158      this.sort = sort;
159      return this;
160    }
161
162    public GetTrashedItemsQueryParams build() {
163      return new GetTrashedItemsQueryParams(this);
164    }
165  }
166}