Add 'sdk/java-v2/' from commit '55f103e336ca9fb8bf1720d2ef4ee8dd4e221118'
[arvados.git] / sdk / java-v2 / src / main / java / org / arvados / client / api / model / argument / ListArgument.java
diff --git a/sdk/java-v2/src/main/java/org/arvados/client/api/model/argument/ListArgument.java b/sdk/java-v2/src/main/java/org/arvados/client/api/model/argument/ListArgument.java
new file mode 100644 (file)
index 0000000..70231e6
--- /dev/null
@@ -0,0 +1,123 @@
+/*
+ * Copyright (C) The Arvados Authors. All rights reserved.
+ *
+ * SPDX-License-Identifier: AGPL-3.0 OR Apache-2.0
+ *
+ */
+
+package org.arvados.client.api.model.argument;
+
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+
+import java.util.List;
+
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@JsonPropertyOrder({ "limit", "offset", "filters", "order", "select", "distinct", "count" })
+public class ListArgument extends Argument {
+
+    @JsonProperty("limit")
+    private Integer limit;
+
+    @JsonProperty("offset")
+    private Integer offset;
+    
+    @JsonProperty("filters")
+    private List<Filter> filters;
+
+    @JsonProperty("order")
+    private List<String> order;
+
+    @JsonProperty("select")
+    private List<String> select;
+
+    @JsonProperty("distinct")
+    private Boolean distinct;
+
+    @JsonProperty("count")
+    private Count count;
+
+
+    ListArgument(Integer limit, Integer offset, List<Filter> filters, List<String> order, List<String> select, Boolean distinct, Count count) {
+        this.limit = limit;
+        this.offset = offset;
+        this.filters = filters;
+        this.order = order;
+        this.select = select;
+        this.distinct = distinct;
+        this.count = count;
+    }
+
+    public static ListArgumentBuilder builder() {
+        return new ListArgumentBuilder();
+    }
+
+    public enum Count {
+        
+        @JsonProperty("exact")
+        EXACT,
+        
+        @JsonProperty("none")
+        NONE
+    }
+
+    public static class ListArgumentBuilder {
+        private Integer limit;
+        private Integer offset;
+        private List<Filter> filters;
+        private List<String> order;
+        private List<String> select;
+        private Boolean distinct;
+        private Count count;
+
+        ListArgumentBuilder() {
+        }
+
+        public ListArgumentBuilder limit(Integer limit) {
+            this.limit = limit;
+            return this;
+        }
+
+        public ListArgumentBuilder offset(Integer offset) {
+            this.offset = offset;
+            return this;
+        }
+
+        public ListArgumentBuilder filters(List<Filter> filters) {
+            this.filters = filters;
+            return this;
+        }
+
+        public ListArgumentBuilder order(List<String> order) {
+            this.order = order;
+            return this;
+        }
+
+        public ListArgumentBuilder select(List<String> select) {
+            this.select = select;
+            return this;
+        }
+
+        public ListArgumentBuilder distinct(Boolean distinct) {
+            this.distinct = distinct;
+            return this;
+        }
+
+        public ListArgumentBuilder count(Count count) {
+            this.count = count;
+            return this;
+        }
+
+        public ListArgument build() {
+            return new ListArgument(limit, offset, filters, order, select, distinct, count);
+        }
+
+        public String toString() {
+            return "ListArgument.ListArgumentBuilder(limit=" + this.limit +
+                    ", offset=" + this.offset + ", filters=" + this.filters +
+                    ", order=" + this.order + ", select=" + this.select +
+                    ", distinct=" + this.distinct + ", count=" + this.count + ")";
+        }
+    }
+}