enumValues) {
33 | this.description = description;
34 | this.defaultValue = defaultValue;
35 | this.enumValues = enumValues;
36 | }
37 | }
38 |
--------------------------------------------------------------------------------
/src/main/java/com/manticoresearch/client/StringUtil.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Manticore Search Client
3 | * Сlient for Manticore Search.
4 | *
5 | * The version of the OpenAPI document: 5.0.0
6 | * Contact: info@manticoresearch.com
7 | *
8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9 | * https://openapi-generator.tech
10 | * Do not edit the class manually.
11 | */
12 |
13 |
14 | package com.manticoresearch.client;
15 |
16 | import java.util.Collection;
17 | import java.util.Iterator;
18 |
19 | @jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-04-01T10:06:34.794647478Z[Etc/UTC]", comments = "Generator version: 7.3.0-SNAPSHOT")
20 | public class StringUtil {
21 | /**
22 | * Check if the given array contains the given value (with case-insensitive comparison).
23 | *
24 | * @param array The array
25 | * @param value The value to search
26 | * @return true if the array contains the value
27 | */
28 | public static boolean containsIgnoreCase(String[] array, String value) {
29 | for (String str : array) {
30 | if (value == null && str == null) {
31 | return true;
32 | }
33 | if (value != null && value.equalsIgnoreCase(str)) {
34 | return true;
35 | }
36 | }
37 | return false;
38 | }
39 |
40 | /**
41 | * Join an array of strings with the given separator.
42 | *
43 | * Note: This might be replaced by utility method from commons-lang or guava someday
44 | * if one of those libraries is added as dependency.
45 | *
46 | *
47 | * @param array The array of strings
48 | * @param separator The separator
49 | * @return the resulting string
50 | */
51 | public static String join(String[] array, String separator) {
52 | int len = array.length;
53 | if (len == 0) {
54 | return "";
55 | }
56 |
57 | StringBuilder out = new StringBuilder();
58 | out.append(array[0]);
59 | for (int i = 1; i < len; i++) {
60 | out.append(separator).append(array[i]);
61 | }
62 | return out.toString();
63 | }
64 |
65 | /**
66 | * Join a list of strings with the given separator.
67 | *
68 | * @param list The list of strings
69 | * @param separator The separator
70 | * @return the resulting string
71 | */
72 | public static String join(Collection list, String separator) {
73 | Iterator iterator = list.iterator();
74 | StringBuilder out = new StringBuilder();
75 | if (iterator.hasNext()) {
76 | out.append(iterator.next());
77 | }
78 | while (iterator.hasNext()) {
79 | out.append(separator).append(iterator.next());
80 | }
81 | return out.toString();
82 | }
83 | }
84 |
--------------------------------------------------------------------------------
/src/main/java/com/manticoresearch/client/auth/ApiKeyAuth.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Manticore Search Client
3 | * Сlient for Manticore Search.
4 | *
5 | * The version of the OpenAPI document: 5.0.0
6 | * Contact: info@manticoresearch.com
7 | *
8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9 | * https://openapi-generator.tech
10 | * Do not edit the class manually.
11 | */
12 |
13 |
14 | package com.manticoresearch.client.auth;
15 |
16 | import com.manticoresearch.client.Pair;
17 | import com.manticoresearch.client.ApiException;
18 |
19 | import java.net.URI;
20 | import java.util.Map;
21 | import java.util.List;
22 |
23 | @jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-04-01T10:06:34.794647478Z[Etc/UTC]", comments = "Generator version: 7.3.0-SNAPSHOT")
24 | public class ApiKeyAuth implements Authentication {
25 | private final String location;
26 | private final String paramName;
27 |
28 | private String apiKey;
29 | private String apiKeyPrefix;
30 |
31 | public ApiKeyAuth(String location, String paramName) {
32 | this.location = location;
33 | this.paramName = paramName;
34 | }
35 |
36 | public String getLocation() {
37 | return location;
38 | }
39 |
40 | public String getParamName() {
41 | return paramName;
42 | }
43 |
44 | public String getApiKey() {
45 | return apiKey;
46 | }
47 |
48 | public void setApiKey(String apiKey) {
49 | this.apiKey = apiKey;
50 | }
51 |
52 | public String getApiKeyPrefix() {
53 | return apiKeyPrefix;
54 | }
55 |
56 | public void setApiKeyPrefix(String apiKeyPrefix) {
57 | this.apiKeyPrefix = apiKeyPrefix;
58 | }
59 |
60 | @Override
61 | public void applyToParams(List queryParams, Map headerParams, Map cookieParams, String payload, String method, URI uri) throws ApiException {
62 | if (apiKey == null) {
63 | return;
64 | }
65 | String value;
66 | if (apiKeyPrefix != null) {
67 | value = apiKeyPrefix + " " + apiKey;
68 | } else {
69 | value = apiKey;
70 | }
71 | if ("query".equals(location)) {
72 | queryParams.add(new Pair(paramName, value));
73 | } else if ("header".equals(location)) {
74 | headerParams.put(paramName, value);
75 | } else if ("cookie".equals(location)) {
76 | cookieParams.put(paramName, value);
77 | }
78 | }
79 | }
80 |
--------------------------------------------------------------------------------
/src/main/java/com/manticoresearch/client/auth/Authentication.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Manticore Search Client
3 | * Сlient for Manticore Search.
4 | *
5 | * The version of the OpenAPI document: 5.0.0
6 | * Contact: info@manticoresearch.com
7 | *
8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9 | * https://openapi-generator.tech
10 | * Do not edit the class manually.
11 | */
12 |
13 |
14 | package com.manticoresearch.client.auth;
15 |
16 | import com.manticoresearch.client.Pair;
17 | import com.manticoresearch.client.ApiException;
18 |
19 | import java.net.URI;
20 | import java.util.Map;
21 | import java.util.List;
22 |
23 | public interface Authentication {
24 | /**
25 | * Apply authentication settings to header and query params.
26 | *
27 | * @param queryParams List of query parameters
28 | * @param headerParams Map of header parameters
29 | * @param cookieParams Map of cookie parameters
30 | */
31 | void applyToParams(List queryParams, Map headerParams, Map cookieParams, String payload, String method, URI uri) throws ApiException;
32 |
33 | }
34 |
--------------------------------------------------------------------------------
/src/main/java/com/manticoresearch/client/auth/HttpBasicAuth.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Manticore Search Client
3 | * Сlient for Manticore Search.
4 | *
5 | * The version of the OpenAPI document: 5.0.0
6 | * Contact: info@manticoresearch.com
7 | *
8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9 | * https://openapi-generator.tech
10 | * Do not edit the class manually.
11 | */
12 |
13 |
14 | package com.manticoresearch.client.auth;
15 |
16 | import com.manticoresearch.client.Pair;
17 | import com.manticoresearch.client.ApiException;
18 |
19 | import java.util.Base64;
20 | import java.nio.charset.StandardCharsets;
21 |
22 | import java.net.URI;
23 | import java.util.Map;
24 | import java.util.List;
25 |
26 | @jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-04-01T10:06:34.794647478Z[Etc/UTC]", comments = "Generator version: 7.3.0-SNAPSHOT")
27 | public class HttpBasicAuth implements Authentication {
28 | private String username;
29 | private String password;
30 |
31 | public String getUsername() {
32 | return username;
33 | }
34 |
35 | public void setUsername(String username) {
36 | this.username = username;
37 | }
38 |
39 | public String getPassword() {
40 | return password;
41 | }
42 |
43 | public void setPassword(String password) {
44 | this.password = password;
45 | }
46 |
47 | @Override
48 | public void applyToParams(List queryParams, Map headerParams, Map cookieParams, String payload, String method, URI uri) throws ApiException {
49 | if (username == null && password == null) {
50 | return;
51 | }
52 | String str = (username == null ? "" : username) + ":" + (password == null ? "" : password);
53 | headerParams.put("Authorization", "Basic " + Base64.getEncoder().encodeToString(str.getBytes(StandardCharsets.UTF_8)));
54 | }
55 | }
56 |
--------------------------------------------------------------------------------
/src/main/java/com/manticoresearch/client/auth/HttpBearerAuth.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Manticore Search Client
3 | * Сlient for Manticore Search.
4 | *
5 | * The version of the OpenAPI document: 5.0.0
6 | * Contact: info@manticoresearch.com
7 | *
8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9 | * https://openapi-generator.tech
10 | * Do not edit the class manually.
11 | */
12 |
13 |
14 | package com.manticoresearch.client.auth;
15 |
16 | import com.manticoresearch.client.Pair;
17 | import com.manticoresearch.client.ApiException;
18 |
19 | import java.net.URI;
20 | import java.util.Map;
21 | import java.util.List;
22 |
23 | @jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-04-01T10:06:34.794647478Z[Etc/UTC]", comments = "Generator version: 7.3.0-SNAPSHOT")
24 | public class HttpBearerAuth implements Authentication {
25 | private final String scheme;
26 | private String bearerToken;
27 |
28 | public HttpBearerAuth(String scheme) {
29 | this.scheme = scheme;
30 | }
31 |
32 | /**
33 | * Gets the token, which together with the scheme, will be sent as the value of the Authorization header.
34 | *
35 | * @return The bearer token
36 | */
37 | public String getBearerToken() {
38 | return bearerToken;
39 | }
40 |
41 | /**
42 | * Sets the token, which together with the scheme, will be sent as the value of the Authorization header.
43 | *
44 | * @param bearerToken The bearer token to send in the Authorization header
45 | */
46 | public void setBearerToken(String bearerToken) {
47 | this.bearerToken = bearerToken;
48 | }
49 |
50 | @Override
51 | public void applyToParams(List queryParams, Map headerParams, Map cookieParams, String payload, String method, URI uri) throws ApiException {
52 | if(bearerToken == null) {
53 | return;
54 | }
55 |
56 | headerParams.put("Authorization", (scheme != null ? upperCaseBearer(scheme) + " " : "") + bearerToken);
57 | }
58 |
59 | private static String upperCaseBearer(String scheme) {
60 | return ("bearer".equalsIgnoreCase(scheme)) ? "Bearer" : scheme;
61 | }
62 | }
63 |
--------------------------------------------------------------------------------
/src/main/java/com/manticoresearch/client/model/AbstractOpenApiSchema.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Manticore Search Client
3 | * Сlient for Manticore Search.
4 | *
5 | * The version of the OpenAPI document: 5.0.0
6 | * Contact: info@manticoresearch.com
7 | *
8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9 | * https://openapi-generator.tech
10 | * Do not edit the class manually.
11 | */
12 |
13 |
14 | package com.manticoresearch.client.model;
15 |
16 | import com.manticoresearch.client.ApiException;
17 | import java.util.Objects;
18 | import java.lang.reflect.Type;
19 | import java.util.Map;
20 | import jakarta.ws.rs.core.GenericType;
21 |
22 | import com.fasterxml.jackson.annotation.JsonValue;
23 |
24 | /**
25 | * Abstract class for oneOf,anyOf schemas defined in OpenAPI spec
26 | */
27 | @jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-04-01T10:06:34.794647478Z[Etc/UTC]", comments = "Generator version: 7.3.0-SNAPSHOT")
28 | public abstract class AbstractOpenApiSchema {
29 |
30 | // store the actual instance of the schema/object
31 | private Object instance;
32 |
33 | // is nullable
34 | private Boolean isNullable;
35 |
36 | // schema type (e.g. oneOf, anyOf)
37 | private final String schemaType;
38 |
39 | public AbstractOpenApiSchema(String schemaType, Boolean isNullable) {
40 | this.schemaType = schemaType;
41 | this.isNullable = isNullable;
42 | }
43 |
44 | /**
45 | * Get the list of oneOf/anyOf composed schemas allowed to be stored in this object
46 | *
47 | * @return an instance of the actual schema/object
48 | */
49 | public abstract Map> getSchemas();
50 |
51 | /**
52 | * Get the actual instance
53 | *
54 | * @return an instance of the actual schema/object
55 | */
56 | @JsonValue
57 | public Object getActualInstance() {return instance;}
58 |
59 | /**
60 | * Set the actual instance
61 | *
62 | * @param instance the actual instance of the schema/object
63 | */
64 | public void setActualInstance(Object instance) {this.instance = instance;}
65 |
66 | /**
67 | * Get the instant recursively when the schemas defined in oneOf/anyof happen to be oneOf/anyOf schema as well
68 | *
69 | * @return an instance of the actual schema/object
70 | */
71 | public Object getActualInstanceRecursively() {
72 | return getActualInstanceRecursively(this);
73 | }
74 |
75 | private Object getActualInstanceRecursively(AbstractOpenApiSchema object) {
76 | if (object.getActualInstance() == null) {
77 | return null;
78 | } else if (object.getActualInstance() instanceof AbstractOpenApiSchema) {
79 | return getActualInstanceRecursively((AbstractOpenApiSchema)object.getActualInstance());
80 | } else {
81 | return object.getActualInstance();
82 | }
83 | }
84 |
85 | /**
86 | * Get the schema type (e.g. anyOf, oneOf)
87 | *
88 | * @return the schema type
89 | */
90 | public String getSchemaType() {
91 | return schemaType;
92 | }
93 |
94 | @Override
95 | public String toString() {
96 | StringBuilder sb = new StringBuilder();
97 | sb.append("class ").append(getClass()).append(" {\n");
98 | sb.append(" instance: ").append(toIndentedString(instance)).append("\n");
99 | sb.append(" isNullable: ").append(toIndentedString(isNullable)).append("\n");
100 | sb.append(" schemaType: ").append(toIndentedString(schemaType)).append("\n");
101 | sb.append("}");
102 | return sb.toString();
103 | }
104 |
105 | /**
106 | * Convert the given object to string with each line indented by 4 spaces
107 | * (except the first line).
108 | */
109 | private String toIndentedString(Object o) {
110 | if (o == null) {
111 | return "null";
112 | }
113 | return o.toString().replace("\n", "\n ");
114 | }
115 |
116 | public boolean equals(Object o) {
117 | if (this == o) {
118 | return true;
119 | }
120 | if (o == null || getClass() != o.getClass()) {
121 | return false;
122 | }
123 | AbstractOpenApiSchema a = (AbstractOpenApiSchema) o;
124 | return Objects.equals(this.instance, a.instance) &&
125 | Objects.equals(this.isNullable, a.isNullable) &&
126 | Objects.equals(this.schemaType, a.schemaType);
127 | }
128 |
129 | @Override
130 | public int hashCode() {
131 | return Objects.hash(instance, isNullable, schemaType);
132 | }
133 |
134 | /**
135 | * Is nullable
136 | *
137 | * @return true if it's nullable
138 | */
139 | public Boolean isNullable() {
140 | if (Boolean.TRUE.equals(isNullable)) {
141 | return Boolean.TRUE;
142 | } else {
143 | return Boolean.FALSE;
144 | }
145 | }
146 |
147 |
148 |
149 | }
150 |
--------------------------------------------------------------------------------
/src/main/java/com/manticoresearch/client/model/AggComposite.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Manticore Search Client
3 | * Сlient for Manticore Search.
4 | *
5 | * The version of the OpenAPI document: 5.0.0
6 | * Contact: info@manticoresearch.com
7 | *
8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9 | * https://openapi-generator.tech
10 | * Do not edit the class manually.
11 | */
12 |
13 |
14 | package com.manticoresearch.client.model;
15 |
16 | import java.util.Objects;
17 | import java.util.Map;
18 | import java.util.HashMap;
19 | import com.fasterxml.jackson.annotation.JsonInclude;
20 | import com.fasterxml.jackson.annotation.JsonProperty;
21 | import com.fasterxml.jackson.annotation.JsonCreator;
22 | import com.fasterxml.jackson.annotation.JsonTypeName;
23 | import com.fasterxml.jackson.annotation.JsonValue;
24 | import com.manticoresearch.client.model.AggCompositeSource;
25 | import java.util.ArrayList;
26 | import java.util.Arrays;
27 | import java.util.List;
28 | import java.util.Map;
29 | import com.fasterxml.jackson.annotation.JsonPropertyOrder;
30 | import com.manticoresearch.client.JSON;
31 |
32 |
33 | /**
34 | * Object to perform composite aggregation, i.e., grouping search results by multiple fields
35 | */
36 | @JsonPropertyOrder({
37 | AggComposite.JSON_PROPERTY_SIZE,
38 | AggComposite.JSON_PROPERTY_SOURCES
39 | })
40 | @JsonTypeName("aggComposite")
41 | @jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-04-01T10:06:34.794647478Z[Etc/UTC]", comments = "Generator version: 7.3.0-SNAPSHOT")
42 | public class AggComposite {
43 | public static final String JSON_PROPERTY_SIZE = "size";
44 | private Integer size;
45 |
46 | public static final String JSON_PROPERTY_SOURCES = "sources";
47 | private List