Fix 2.4.2 upgrade notes formatting refs #19330
[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" })
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     ListArgument(Integer limit, Integer offset, List<Filter> filters, List<String> order, List<String> select, Boolean distinct, Count count, Boolean excludeHomeProject) {
45         this.limit = limit;
46         this.offset = offset;
47         this.filters = filters;
48         this.order = order;
49         this.select = select;
50         this.distinct = distinct;
51         this.count = count;
52         this.excludeHomeProject = excludeHomeProject;
53     }
54
55     public static ListArgumentBuilder builder() {
56         return new ListArgumentBuilder();
57     }
58
59     public enum Count {
60         
61         @JsonProperty("exact")
62         EXACT,
63         
64         @JsonProperty("none")
65         NONE
66     }
67
68     public static class ListArgumentBuilder {
69         private Integer limit;
70         private Integer offset;
71         private List<Filter> filters;
72         private List<String> order;
73         private List<String> select;
74         private Boolean distinct;
75         private Count count;
76         private Boolean excludeHomeProject;
77
78         ListArgumentBuilder() {
79         }
80
81         public ListArgumentBuilder limit(Integer limit) {
82             this.limit = limit;
83             return this;
84         }
85
86         public ListArgumentBuilder offset(Integer offset) {
87             this.offset = offset;
88             return this;
89         }
90
91         public ListArgumentBuilder filters(List<Filter> filters) {
92             this.filters = filters;
93             return this;
94         }
95
96         public ListArgumentBuilder order(List<String> order) {
97             this.order = order;
98             return this;
99         }
100
101         public ListArgumentBuilder select(List<String> select) {
102             this.select = select;
103             return this;
104         }
105
106         public ListArgumentBuilder distinct(Boolean distinct) {
107             this.distinct = distinct;
108             return this;
109         }
110
111         public ListArgumentBuilder count(Count count) {
112             this.count = count;
113             return this;
114         }
115
116         public ListArgument.ListArgumentBuilder excludeHomeProject(Boolean excludeHomeProject) {
117             this.excludeHomeProject = excludeHomeProject;
118             return this;
119         }
120
121         public ListArgument build() {
122             return new ListArgument(limit, offset, filters, order, select, distinct, count, excludeHomeProject);
123         }
124
125         public String toString() {
126             return "ListArgument.ListArgumentBuilder(limit=" + this.limit +
127                     ", offset=" + this.offset + ", filters=" + this.filters +
128                     ", order=" + this.order + ", select=" + this.select +
129                     ", distinct=" + this.distinct + ", count=" + this.count +
130                     ", excludeHomeProject=" + this.excludeHomeProject + ")";
131         }
132     }
133 }