Add new list method parameters: include_old_versions, include_trash
[arvados.git] / sdk / java-v2 / src / main / java / org / arvados / client / api / model / argument / ListArgument.java
1 /*
2  * Copyright (C) The Arvados Authors. All rights reserved.
3  *
4  * SPDX-License-Identifier: AGPL-3.0 OR Apache-2.0
5  *
6  */
7
8 package org.arvados.client.api.model.argument;
9
10 import com.fasterxml.jackson.annotation.JsonInclude;
11 import com.fasterxml.jackson.annotation.JsonProperty;
12 import com.fasterxml.jackson.annotation.JsonPropertyOrder;
13
14 import java.util.List;
15
16 @JsonInclude(JsonInclude.Include.NON_NULL)
17 @JsonPropertyOrder({ "limit", "offset", "filters", "order", "select", "distinct", "count", "exclude_home_project", "include_old_versions", "include_trash" })
18 public class ListArgument extends Argument {
19
20     @JsonProperty("limit")
21     private Integer limit;
22
23     @JsonProperty("offset")
24     private Integer offset;
25     
26     @JsonProperty("filters")
27     private List<Filter> filters;
28
29     @JsonProperty("order")
30     private List<String> order;
31
32     @JsonProperty("select")
33     private List<String> select;
34
35     @JsonProperty("distinct")
36     private Boolean distinct;
37
38     @JsonProperty("count")
39     private Count count;
40
41     @JsonProperty("exclude_home_project")
42     private Boolean excludeHomeProject;
43
44     @JsonProperty("include_old_versions")
45     private Boolean includeOldVersions;
46
47     @JsonProperty("include_trash")
48     private Boolean includeTrash;
49
50     ListArgument(
51             Integer limit, Integer offset, List<Filter> filters, List<String> order, List<String> select,
52             Boolean distinct, Count count, Boolean excludeHomeProject, Boolean includeOldVersions,
53             Boolean includeTrash
54     ) {
55         this.limit = limit;
56         this.offset = offset;
57         this.filters = filters;
58         this.order = order;
59         this.select = select;
60         this.distinct = distinct;
61         this.count = count;
62         this.excludeHomeProject = excludeHomeProject;
63         this.includeOldVersions = includeOldVersions;
64         this.includeTrash = includeTrash;
65     }
66
67     public static ListArgumentBuilder builder() {
68         return new ListArgumentBuilder();
69     }
70
71     public enum Count {
72         
73         @JsonProperty("exact")
74         EXACT,
75         
76         @JsonProperty("none")
77         NONE
78     }
79
80     public static class ListArgumentBuilder {
81         private Integer limit;
82         private Integer offset;
83         private List<Filter> filters;
84         private List<String> order;
85         private List<String> select;
86         private Boolean distinct;
87         private Count count;
88         private Boolean excludeHomeProject;
89         private Boolean includeOldVersions;
90         private Boolean includeTrash;
91
92         ListArgumentBuilder() {
93         }
94
95         public ListArgumentBuilder limit(Integer limit) {
96             this.limit = limit;
97             return this;
98         }
99
100         public ListArgumentBuilder offset(Integer offset) {
101             this.offset = offset;
102             return this;
103         }
104
105         public ListArgumentBuilder filters(List<Filter> filters) {
106             this.filters = filters;
107             return this;
108         }
109
110         public ListArgumentBuilder order(List<String> order) {
111             this.order = order;
112             return this;
113         }
114
115         public ListArgumentBuilder select(List<String> select) {
116             this.select = select;
117             return this;
118         }
119
120         public ListArgumentBuilder distinct(Boolean distinct) {
121             this.distinct = distinct;
122             return this;
123         }
124
125         public ListArgumentBuilder count(Count count) {
126             this.count = count;
127             return this;
128         }
129
130         public ListArgument.ListArgumentBuilder excludeHomeProject(Boolean excludeHomeProject) {
131             this.excludeHomeProject = excludeHomeProject;
132             return this;
133         }
134
135         public ListArgument.ListArgumentBuilder includeOldVersions(Boolean includeOldVersions) {
136             this.includeOldVersions = includeOldVersions;
137             return this;
138         }
139
140         public ListArgument.ListArgumentBuilder includeTrash(Boolean includeTrash) {
141             this.includeTrash = includeTrash;
142             return this;
143         }
144
145         public ListArgument build() {
146             return new ListArgument(limit, offset, filters, order, select, distinct, count, excludeHomeProject, includeOldVersions, includeTrash);
147         }
148
149         public String toString() {
150             return "ListArgument.ListArgumentBuilder(limit=" + this.limit +
151                     ", offset=" + this.offset + ", filters=" + this.filters +
152                     ", order=" + this.order + ", select=" + this.select +
153                     ", distinct=" + this.distinct + ", count=" + this.count +
154                     ", excludeHomeProject=" + this.excludeHomeProject +
155                     ", includeOldVersions=" + this.includeOldVersions +
156                     ", includeTrash=" + this.includeTrash +
157                     ")";
158         }
159     }
160 }