001package com.box.sdkgen.managers.folders; 002 003import com.box.sdkgen.serialization.json.EnumWrapper; 004import java.util.List; 005 006public class GetFolderByIdQueryParams { 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 * <p>Additionally this field can be used to query any metadata applied to the file by specifying 017 * the `metadata` field as well as the scope and key of the template to retrieve, for example 018 * `?fields=metadata.enterprise_12345.contractTemplate`. 019 */ 020 public List<String> fields; 021 022 /** 023 * Defines the **second** attribute by which items are sorted. 024 * 025 * <p>The folder type affects the way the items are sorted: 026 * 027 * <p>* **Standard folder**: Items are always sorted by their `type` first, with folders listed 028 * before files, and files listed before web links. 029 * 030 * <p>* **Root folder**: This parameter is not supported for marker-based pagination on the root 031 * folder 032 * 033 * <p>(the folder with an `id` of `0`). 034 * 035 * <p>* **Shared folder with parent path to the associated folder visible to the collaborator**: 036 * Items are always sorted by their `type` first, with folders listed before files, and files 037 * listed before web links. 038 */ 039 public EnumWrapper<GetFolderByIdQueryParamsSortField> sort; 040 041 /** 042 * The direction to sort results in. This can be either in alphabetical ascending (`ASC`) or 043 * descending (`DESC`) order. 044 */ 045 public EnumWrapper<GetFolderByIdQueryParamsDirectionField> direction; 046 047 /** 048 * The offset of the item at which to begin the response. 049 * 050 * <p>Offset-based pagination is not guaranteed to work reliably for high offset values and may 051 * fail for large datasets. In those cases, reduce the number of items in the folder (for example, 052 * by restructuring the folder into smaller subfolders) before retrying the request. 053 */ 054 public Long offset; 055 056 /** The maximum number of items to return per page. */ 057 public Long limit; 058 059 public GetFolderByIdQueryParams() {} 060 061 protected GetFolderByIdQueryParams(Builder builder) { 062 this.fields = builder.fields; 063 this.sort = builder.sort; 064 this.direction = builder.direction; 065 this.offset = builder.offset; 066 this.limit = builder.limit; 067 } 068 069 public List<String> getFields() { 070 return fields; 071 } 072 073 public EnumWrapper<GetFolderByIdQueryParamsSortField> getSort() { 074 return sort; 075 } 076 077 public EnumWrapper<GetFolderByIdQueryParamsDirectionField> getDirection() { 078 return direction; 079 } 080 081 public Long getOffset() { 082 return offset; 083 } 084 085 public Long getLimit() { 086 return limit; 087 } 088 089 public static class Builder { 090 091 protected List<String> fields; 092 093 protected EnumWrapper<GetFolderByIdQueryParamsSortField> sort; 094 095 protected EnumWrapper<GetFolderByIdQueryParamsDirectionField> direction; 096 097 protected Long offset; 098 099 protected Long limit; 100 101 public Builder fields(List<String> fields) { 102 this.fields = fields; 103 return this; 104 } 105 106 public Builder sort(GetFolderByIdQueryParamsSortField sort) { 107 this.sort = new EnumWrapper<GetFolderByIdQueryParamsSortField>(sort); 108 return this; 109 } 110 111 public Builder sort(EnumWrapper<GetFolderByIdQueryParamsSortField> sort) { 112 this.sort = sort; 113 return this; 114 } 115 116 public Builder direction(GetFolderByIdQueryParamsDirectionField direction) { 117 this.direction = new EnumWrapper<GetFolderByIdQueryParamsDirectionField>(direction); 118 return this; 119 } 120 121 public Builder direction(EnumWrapper<GetFolderByIdQueryParamsDirectionField> direction) { 122 this.direction = direction; 123 return this; 124 } 125 126 public Builder offset(Long offset) { 127 this.offset = offset; 128 return this; 129 } 130 131 public Builder limit(Long limit) { 132 this.limit = limit; 133 return this; 134 } 135 136 public GetFolderByIdQueryParams build() { 137 return new GetFolderByIdQueryParams(this); 138 } 139 } 140}