interceptors) {
OkHttpClient.Builder builder = new OkHttpClient.Builder();
builder.addNetworkInterceptor(getProgressInterceptor());
- for (Interceptor interceptor : interceptors) {
+ for (Interceptor interceptor: interceptors) {
builder.addInterceptor(interceptor);
}
@@ -236,9 +245,9 @@ public boolean isVerifyingSsl() {
}
/**
- * Configure whether to verify certificate and hostname when making https requests. Default to
- * true. NOTE: Do NOT set to false in production code, otherwise you would face multiple types
- * of cryptographic attacks.
+ * Configure whether to verify certificate and hostname when making https requests.
+ * Default to true.
+ * NOTE: Do NOT set to false in production code, otherwise you would face multiple types of cryptographic attacks.
*
* @param verifyingSsl True to verify TLS/SSL connection
* @return ApiClient
@@ -259,8 +268,8 @@ public InputStream getSslCaCert() {
}
/**
- * Configure the CA certificate to be trusted when making https requests. Use null to reset to
- * default.
+ * Configure the CA certificate to be trusted when making https requests.
+ * Use null to reset to default.
*
* @param sslCaCert input stream for SSL CA cert
* @return ApiClient
@@ -272,7 +281,7 @@ public ApiClient setSslCaCert(InputStream sslCaCert) {
}
/**
- * Getter for the field keyManagers.
+ * Getter for the field keyManagers.
*
* @return an array of {@link javax.net.ssl.KeyManager} objects
*/
@@ -281,8 +290,8 @@ public KeyManager[] getKeyManagers() {
}
/**
- * Configure client keys to use for authorization in an SSL session. Use null to reset to
- * default.
+ * Configure client keys to use for authorization in an SSL session.
+ * Use null to reset to default.
*
* @param managers The KeyManagers to use
* @return ApiClient
@@ -294,7 +303,7 @@ public ApiClient setKeyManagers(KeyManager[] managers) {
}
/**
- * Getter for the field dateFormat.
+ * Getter for the field dateFormat.
*
* @return a {@link java.text.DateFormat} object
*/
@@ -303,7 +312,7 @@ public DateFormat getDateFormat() {
}
/**
- * Setter for the field dateFormat.
+ * Setter for the field dateFormat.
*
* @param dateFormat a {@link java.text.DateFormat} object
* @return a {@link com.configcat.publicapi.java.client.ApiClient} object
@@ -314,7 +323,7 @@ public ApiClient setDateFormat(DateFormat dateFormat) {
}
/**
- * Set SqlDateFormat.
+ * Set SqlDateFormat.
*
* @param dateFormat a {@link java.text.DateFormat} object
* @return a {@link com.configcat.publicapi.java.client.ApiClient} object
@@ -325,7 +334,7 @@ public ApiClient setSqlDateFormat(DateFormat dateFormat) {
}
/**
- * Set OffsetDateTimeFormat.
+ * Set OffsetDateTimeFormat.
*
* @param dateFormat a {@link java.time.format.DateTimeFormatter} object
* @return a {@link com.configcat.publicapi.java.client.ApiClient} object
@@ -336,7 +345,7 @@ public ApiClient setOffsetDateTimeFormat(DateTimeFormatter dateFormat) {
}
/**
- * Set LocalDateFormat.
+ * Set LocalDateFormat.
*
* @param dateFormat a {@link java.time.format.DateTimeFormatter} object
* @return a {@link com.configcat.publicapi.java.client.ApiClient} object
@@ -347,7 +356,7 @@ public ApiClient setLocalDateFormat(DateTimeFormatter dateFormat) {
}
/**
- * Set LenientOnJson.
+ * Set LenientOnJson.
*
* @param lenientOnJson a boolean
* @return a {@link com.configcat.publicapi.java.client.ApiClient} object
@@ -376,6 +385,7 @@ public Authentication getAuthentication(String authName) {
return authentications.get(authName);
}
+
/**
* Helper method to set username for the first HTTP basic authentication.
*
@@ -453,8 +463,7 @@ public void setAccessToken(String accessToken) {
* @param region Region
* @param service Service to access to
*/
- public void setAWS4Configuration(
- String accessKey, String secretKey, String region, String service) {
+ public void setAWS4Configuration(String accessKey, String secretKey, String region, String service) {
throw new RuntimeException("No AWS4 authentication configured!");
}
@@ -467,12 +476,7 @@ public void setAWS4Configuration(
* @param region Region
* @param service Service to access to
*/
- public void setAWS4Configuration(
- String accessKey,
- String secretKey,
- String sessionToken,
- String region,
- String service) {
+ public void setAWS4Configuration(String accessKey, String secretKey, String sessionToken, String region, String service) {
throw new RuntimeException("No AWS4 authentication configured!");
}
@@ -544,12 +548,11 @@ public ApiClient setDebugging(boolean debugging) {
}
/**
- * The path of temporary folder used to store downloaded files from endpoints with file
- * response. The default value is null, i.e. using the system's default temporary
- * folder.
+ * The path of temporary folder used to store downloaded files from endpoints
+ * with file response. The default value is null, i.e. using
+ * the system's default temporary folder.
*
- * @see createTempFile
+ * @see createTempFile
* @return Temporary folder path
*/
public String getTempFolderPath() {
@@ -577,18 +580,15 @@ public int getConnectTimeout() {
}
/**
- * Sets the connect timeout (in milliseconds). A value of 0 means no timeout, otherwise values
- * must be between 1 and {@link java.lang.Integer#MAX_VALUE}.
+ * Sets the connect timeout (in milliseconds).
+ * A value of 0 means no timeout, otherwise values must be between 1 and
+ * {@link java.lang.Integer#MAX_VALUE}.
*
* @param connectionTimeout connection timeout in milliseconds
* @return Api client
*/
public ApiClient setConnectTimeout(int connectionTimeout) {
- httpClient =
- httpClient
- .newBuilder()
- .connectTimeout(connectionTimeout, TimeUnit.MILLISECONDS)
- .build();
+ httpClient = httpClient.newBuilder().connectTimeout(connectionTimeout, TimeUnit.MILLISECONDS).build();
return this;
}
@@ -602,15 +602,15 @@ public int getReadTimeout() {
}
/**
- * Sets the read timeout (in milliseconds). A value of 0 means no timeout, otherwise values must
- * be between 1 and {@link java.lang.Integer#MAX_VALUE}.
+ * Sets the read timeout (in milliseconds).
+ * A value of 0 means no timeout, otherwise values must be between 1 and
+ * {@link java.lang.Integer#MAX_VALUE}.
*
* @param readTimeout read timeout in milliseconds
* @return Api client
*/
public ApiClient setReadTimeout(int readTimeout) {
- httpClient =
- httpClient.newBuilder().readTimeout(readTimeout, TimeUnit.MILLISECONDS).build();
+ httpClient = httpClient.newBuilder().readTimeout(readTimeout, TimeUnit.MILLISECONDS).build();
return this;
}
@@ -624,18 +624,19 @@ public int getWriteTimeout() {
}
/**
- * Sets the write timeout (in milliseconds). A value of 0 means no timeout, otherwise values
- * must be between 1 and {@link java.lang.Integer#MAX_VALUE}.
+ * Sets the write timeout (in milliseconds).
+ * A value of 0 means no timeout, otherwise values must be between 1 and
+ * {@link java.lang.Integer#MAX_VALUE}.
*
* @param writeTimeout connection timeout in milliseconds
* @return Api client
*/
public ApiClient setWriteTimeout(int writeTimeout) {
- httpClient =
- httpClient.newBuilder().writeTimeout(writeTimeout, TimeUnit.MILLISECONDS).build();
+ httpClient = httpClient.newBuilder().writeTimeout(writeTimeout, TimeUnit.MILLISECONDS).build();
return this;
}
+
/**
* Format the given parameter object into string.
*
@@ -645,10 +646,8 @@ public ApiClient setWriteTimeout(int writeTimeout) {
public String parameterToString(Object param) {
if (param == null) {
return "";
- } else if (param instanceof Date
- || param instanceof OffsetDateTime
- || param instanceof LocalDate) {
- // Serialize to json string and remove the " enclosing characters
+ } else if (param instanceof Date || param instanceof OffsetDateTime || param instanceof LocalDate) {
+ //Serialize to json string and remove the " enclosing characters
String jsonStr = JSON.serialize(param);
return jsonStr.substring(1, jsonStr.length() - 1);
} else if (param instanceof Collection) {
@@ -668,7 +667,7 @@ public String parameterToString(Object param) {
/**
* Formats the specified query parameter to a list containing a single {@code Pair} object.
*
- * Note that {@code value} must not be a collection.
+ * Note that {@code value} must not be a collection.
*
* @param name The name of the parameter.
* @param value The value of the parameter.
@@ -689,7 +688,7 @@ public List parameterToPair(String name, Object value) {
/**
* Formats the specified collection query parameters to a list of {@code Pair} objects.
*
- * Note that the values of each of the returned Pair objects are percent-encoded.
+ * Note that the values of each of the returned Pair objects are percent-encoded.
*
* @param collectionFormat The collection format of the parameter.
* @param name The name of the parameter.
@@ -761,7 +760,7 @@ public String collectionPathParameterToString(String collectionFormat, Collectio
delimiter = "|";
}
- StringBuilder sb = new StringBuilder();
+ StringBuilder sb = new StringBuilder() ;
for (Object item : value) {
sb.append(delimiter);
sb.append(parameterToString(item));
@@ -771,7 +770,8 @@ public String collectionPathParameterToString(String collectionFormat, Collectio
}
/**
- * Sanitize filename by removing path. e.g. ../../sun.gif becomes sun.gif
+ * Sanitize filename by removing path.
+ * e.g. ../../sun.gif becomes sun.gif
*
* @param filename The filename to be sanitized
* @return The sanitized filename
@@ -781,10 +781,13 @@ public String sanitizeFilename(String filename) {
}
/**
- * Check if the given MIME is a JSON MIME. JSON MIME examples: application/json
- * application/json; charset=UTF8 APPLICATION/JSON application/vnd.company+json "* / *" is also
- * default to JSON
- *
+ * Check if the given MIME is a JSON MIME.
+ * JSON MIME examples:
+ * application/json
+ * application/json; charset=UTF8
+ * APPLICATION/JSON
+ * application/vnd.company+json
+ * "* / *" is also default to JSON
* @param mime MIME (Multipurpose Internet Mail Extensions)
* @return True if the given MIME is JSON, false otherwise.
*/
@@ -794,12 +797,13 @@ public boolean isJsonMime(String mime) {
}
/**
- * Select the Accept header's value from the given accepts array: if JSON exists in the given
- * array, use it; otherwise use all of them (joining into a string)
+ * Select the Accept header's value from the given accepts array:
+ * if JSON exists in the given array, use it;
+ * otherwise use all of them (joining into a string)
*
* @param accepts The accepts array to select from
- * @return The Accept header to use. If the given array is empty, null will be returned (not to
- * set the Accept header explicitly).
+ * @return The Accept header to use. If the given array is empty,
+ * null will be returned (not to set the Accept header explicitly).
*/
public String selectHeaderAccept(String[] accepts) {
if (accepts.length == 0) {
@@ -814,12 +818,13 @@ public String selectHeaderAccept(String[] accepts) {
}
/**
- * Select the Content-Type header's value from the given array: if JSON exists in the given
- * array, use it; otherwise use the first one of the array.
+ * Select the Content-Type header's value from the given array:
+ * if JSON exists in the given array, use it;
+ * otherwise use the first one of the array.
*
* @param contentTypes The Content-Type array to select from
- * @return The Content-Type header to use. If the given array is empty, returns null. If it
- * matches "any", JSON will be used.
+ * @return The Content-Type header to use. If the given array is empty,
+ * returns null. If it matches "any", JSON will be used.
*/
public String selectHeaderContentType(String[] contentTypes) {
if (contentTypes.length == 0) {
@@ -854,16 +859,15 @@ public String escapeString(String str) {
}
/**
- * Deserialize response body to Java object, according to the return type and the Content-Type
- * response header.
+ * Deserialize response body to Java object, according to the return type and
+ * the Content-Type response header.
*
* @param Type
* @param response HTTP response
* @param returnType The type of the Java object
* @return The deserialized Java object
- * @throws com.configcat.publicapi.java.client.ApiException If fail to deserialize response
- * body, i.e. cannot read response body or the Content-Type of the response is not
- * supported.
+ * @throws com.configcat.publicapi.java.client.ApiException If fail to deserialize response body, i.e. cannot read response body
+ * or the Content-Type of the response is not supported.
*/
@SuppressWarnings("unchecked")
public T deserialize(Response response, Type returnType) throws ApiException {
@@ -885,8 +889,10 @@ public T deserialize(Response response, Type returnType) throws ApiException
String respBody;
try {
- if (response.body() != null) respBody = response.body().string();
- else respBody = null;
+ if (response.body() != null)
+ respBody = response.body().string();
+ else
+ respBody = null;
} catch (IOException e) {
throw new ApiException(e);
}
@@ -915,14 +921,13 @@ public T deserialize(Response response, Type returnType) throws ApiException
}
/**
- * Serialize the given Java object into request body according to the object's class and the
- * request Content-Type.
+ * Serialize the given Java object into request body according to the object's
+ * class and the request Content-Type.
*
* @param obj The Java object
* @param contentType The request Content-Type
* @return The serialized request body
- * @throws com.configcat.publicapi.java.client.ApiException If fail to serialize the given
- * object
+ * @throws com.configcat.publicapi.java.client.ApiException If fail to serialize the given object
*/
public RequestBody serialize(Object obj, String contentType) throws ApiException {
if (obj instanceof byte[]) {
@@ -952,8 +957,7 @@ public RequestBody serialize(Object obj, String contentType) throws ApiException
* Download file from the given response.
*
* @param response An instance of the Response object
- * @throws com.configcat.publicapi.java.client.ApiException If fail to read file content from
- * response and write to disk
+ * @throws com.configcat.publicapi.java.client.ApiException If fail to read file content from response and write to disk
* @return Downloaded file
*/
public File downloadFileFromResponse(Response response) throws ApiException {
@@ -1001,11 +1005,14 @@ public File prepareDownloadFile(Response response) throws IOException {
suffix = filename.substring(pos);
}
// Files.createTempFile requires the prefix to be at least three characters long
- if (prefix.length() < 3) prefix = "download-";
+ if (prefix.length() < 3)
+ prefix = "download-";
}
- if (tempFolderPath == null) return Files.createTempFile(prefix, suffix).toFile();
- else return Files.createTempFile(Paths.get(tempFolderPath), prefix, suffix).toFile();
+ if (tempFolderPath == null)
+ return Files.createTempFile(prefix, suffix).toFile();
+ else
+ return Files.createTempFile(Paths.get(tempFolderPath), prefix, suffix).toFile();
}
/**
@@ -1026,8 +1033,9 @@ public ApiResponse execute(Call call) throws ApiException {
* @param returnType The return type used to deserialize HTTP response body
* @param The return type corresponding to (same with) returnType
* @param call Call
- * @return ApiResponse object containing response status, headers and data, which is a Java
- * object deserialized from response body and would be null when returnType is null.
+ * @return ApiResponse object containing response status, headers and
+ * data, which is a Java object deserialized from response body and would be null
+ * when returnType is null.
* @throws com.configcat.publicapi.java.client.ApiException If fail to execute the call
*/
public ApiResponse execute(Call call, Type returnType) throws ApiException {
@@ -1062,32 +1070,27 @@ public void executeAsync(Call call, ApiCallback callback) {
*/
@SuppressWarnings("unchecked")
public void executeAsync(Call call, final Type returnType, final ApiCallback callback) {
- call.enqueue(
- new Callback() {
- @Override
- public void onFailure(Call call, IOException e) {
- callback.onFailure(new ApiException(e), 0, null);
- }
+ call.enqueue(new Callback() {
+ @Override
+ public void onFailure(Call call, IOException e) {
+ callback.onFailure(new ApiException(e), 0, null);
+ }
- @Override
- public void onResponse(Call call, Response response) throws IOException {
- T result;
- try {
- result = (T) handleResponse(response, returnType);
- } catch (ApiException e) {
- callback.onFailure(e, response.code(), response.headers().toMultimap());
- return;
- } catch (Exception e) {
- callback.onFailure(
- new ApiException(e),
- response.code(),
- response.headers().toMultimap());
- return;
- }
- callback.onSuccess(
- result, response.code(), response.headers().toMultimap());
- }
- });
+ @Override
+ public void onResponse(Call call, Response response) throws IOException {
+ T result;
+ try {
+ result = (T) handleResponse(response, returnType);
+ } catch (ApiException e) {
+ callback.onFailure(e, response.code(), response.headers().toMultimap());
+ return;
+ } catch (Exception e) {
+ callback.onFailure(new ApiException(e), response.code(), response.headers().toMultimap());
+ return;
+ }
+ callback.onSuccess(result, response.code(), response.headers().toMultimap());
+ }
+ });
}
/**
@@ -1097,8 +1100,8 @@ public void onResponse(Call call, Response response) throws IOException {
* @param response Response
* @param returnType Return type
* @return Type
- * @throws com.configcat.publicapi.java.client.ApiException If the response has an unsuccessful
- * status code or fail to deserialize the response body
+ * @throws com.configcat.publicapi.java.client.ApiException If the response has an unsuccessful status code or
+ * fail to deserialize the response body
*/
public T handleResponse(Response response, Type returnType) throws ApiException {
if (response.isSuccessful()) {
@@ -1109,11 +1112,7 @@ public T handleResponse(Response response, Type returnType) throws ApiExcept
try {
response.body().close();
} catch (Exception e) {
- throw new ApiException(
- response.message(),
- e,
- response.code(),
- response.headers().toMultimap());
+ throw new ApiException(response.message(), e, response.code(), response.headers().toMultimap());
}
}
return null;
@@ -1126,15 +1125,10 @@ public T handleResponse(Response response, Type returnType) throws ApiExcept
try {
respBody = response.body().string();
} catch (IOException e) {
- throw new ApiException(
- response.message(),
- e,
- response.code(),
- response.headers().toMultimap());
+ throw new ApiException(response.message(), e, response.code(), response.headers().toMultimap());
}
}
- throw new ApiException(
- response.message(), response.code(), response.headers().toMultimap(), respBody);
+ throw new ApiException(response.message(), response.code(), response.headers().toMultimap(), respBody);
}
}
@@ -1143,8 +1137,7 @@ public T handleResponse(Response response, Type returnType) throws ApiExcept
*
* @param baseUrl The base URL
* @param path The sub-path of the HTTP URL
- * @param method The request method, one of "GET", "HEAD", "OPTIONS", "POST", "PUT", "PATCH" and
- * "DELETE"
+ * @param method The request method, one of "GET", "HEAD", "OPTIONS", "POST", "PUT", "PATCH" and "DELETE"
* @param queryParams The query parameters
* @param collectionQueryParams The collection query parameters
* @param body The request body object
@@ -1154,35 +1147,10 @@ public T handleResponse(Response response, Type returnType) throws ApiExcept
* @param authNames The authentications to apply
* @param callback Callback for upload/download progress
* @return The HTTP call
- * @throws com.configcat.publicapi.java.client.ApiException If fail to serialize the request
- * body object
- */
- public Call buildCall(
- String baseUrl,
- String path,
- String method,
- List queryParams,
- List collectionQueryParams,
- Object body,
- Map headerParams,
- Map cookieParams,
- Map formParams,
- String[] authNames,
- ApiCallback callback)
- throws ApiException {
- Request request =
- buildRequest(
- baseUrl,
- path,
- method,
- queryParams,
- collectionQueryParams,
- body,
- headerParams,
- cookieParams,
- formParams,
- authNames,
- callback);
+ * @throws com.configcat.publicapi.java.client.ApiException If fail to serialize the request body object
+ */
+ public Call buildCall(String baseUrl, String path, String method, List queryParams, List collectionQueryParams, Object body, Map headerParams, Map cookieParams, Map formParams, String[] authNames, ApiCallback callback) throws ApiException {
+ Request request = buildRequest(baseUrl, path, method, queryParams, collectionQueryParams, body, headerParams, cookieParams, formParams, authNames, callback);
return httpClient.newCall(request);
}
@@ -1192,8 +1160,7 @@ public Call buildCall(
*
* @param baseUrl The base URL
* @param path The sub-path of the HTTP URL
- * @param method The request method, one of "GET", "HEAD", "OPTIONS", "POST", "PUT", "PATCH" and
- * "DELETE"
+ * @param method The request method, one of "GET", "HEAD", "OPTIONS", "POST", "PUT", "PATCH" and "DELETE"
* @param queryParams The query parameters
* @param collectionQueryParams The collection query parameters
* @param body The request body object
@@ -1203,22 +1170,9 @@ public Call buildCall(
* @param authNames The authentications to apply
* @param callback Callback for upload/download progress
* @return The HTTP request
- * @throws com.configcat.publicapi.java.client.ApiException If fail to serialize the request
- * body object
- */
- public Request buildRequest(
- String baseUrl,
- String path,
- String method,
- List queryParams,
- List collectionQueryParams,
- Object body,
- Map headerParams,
- Map cookieParams,
- Map formParams,
- String[] authNames,
- ApiCallback callback)
- throws ApiException {
+ * @throws com.configcat.publicapi.java.client.ApiException If fail to serialize the request body object
+ */
+ public Request buildRequest(String baseUrl, String path, String method, List queryParams, List collectionQueryParams, Object body, Map headerParams, Map cookieParams, Map formParams, String[] authNames, ApiCallback callback) throws ApiException {
// aggregate queryParams (non-collection) and collectionQueryParams into allQueryParams
List allQueryParams = new ArrayList(queryParams);
allQueryParams.addAll(collectionQueryParams);
@@ -1244,23 +1198,14 @@ public Request buildRequest(
reqBody = null;
} else {
// use an empty request body (for POST, PUT and PATCH)
- reqBody =
- RequestBody.create(
- "", contentType == null ? null : MediaType.parse(contentType));
+ reqBody = RequestBody.create("", contentType == null ? null : MediaType.parse(contentType));
}
} else {
reqBody = serialize(body, contentType);
}
// update parameters with authentication settings
- updateParamsForAuth(
- authNames,
- allQueryParams,
- headerParams,
- cookieParams,
- requestBodyToString(reqBody),
- method,
- URI.create(url));
+ updateParamsForAuth(authNames, allQueryParams, headerParams, cookieParams, requestBodyToString(reqBody), method, URI.create(url));
final Request.Builder reqBuilder = new Request.Builder().url(url);
processHeaderParams(headerParams, reqBuilder);
@@ -1291,8 +1236,7 @@ public Request buildRequest(
* @param collectionQueryParams The collection query parameters
* @return The full URL
*/
- public String buildUrl(
- String baseUrl, String path, List queryParams, List collectionQueryParams) {
+ public String buildUrl(String baseUrl, String path, List queryParams, List collectionQueryParams) {
final StringBuilder url = new StringBuilder();
if (baseUrl != null) {
url.append(baseUrl).append(path);
@@ -1300,11 +1244,9 @@ public String buildUrl(
String baseURL;
if (serverIndex != null) {
if (serverIndex < 0 || serverIndex >= servers.size()) {
- throw new ArrayIndexOutOfBoundsException(
- String.format(
- "Invalid index %d when selecting the host settings. Must be"
- + " less than %d",
- serverIndex, servers.size()));
+ throw new ArrayIndexOutOfBoundsException(String.format(
+ "Invalid index %d when selecting the host settings. Must be less than %d", serverIndex, servers.size()
+ ));
}
baseURL = servers.get(serverIndex).URL(serverVariables);
} else {
@@ -1325,9 +1267,7 @@ public String buildUrl(
url.append("&");
}
String value = parameterToString(param.getValue());
- url.append(escapeString(param.getName()))
- .append("=")
- .append(escapeString(value));
+ url.append(escapeString(param.getName())).append("=").append(escapeString(value));
}
}
}
@@ -1377,13 +1317,11 @@ public void processHeaderParams(Map headerParams, Request.Builde
*/
public void processCookieParams(Map cookieParams, Request.Builder reqBuilder) {
for (Entry param : cookieParams.entrySet()) {
- reqBuilder.addHeader(
- "Cookie", String.format("%s=%s", param.getKey(), param.getValue()));
+ reqBuilder.addHeader("Cookie", String.format("%s=%s", param.getKey(), param.getValue()));
}
for (Entry param : defaultCookieMap.entrySet()) {
if (!cookieParams.containsKey(param.getKey())) {
- reqBuilder.addHeader(
- "Cookie", String.format("%s=%s", param.getKey(), param.getValue()));
+ reqBuilder.addHeader("Cookie", String.format("%s=%s", param.getKey(), param.getValue()));
}
}
}
@@ -1400,15 +1338,8 @@ public void processCookieParams(Map cookieParams, Request.Builde
* @param uri URI
* @throws com.configcat.publicapi.java.client.ApiException If fails to update the parameters
*/
- public void updateParamsForAuth(
- String[] authNames,
- List queryParams,
- Map headerParams,
- Map cookieParams,
- String payload,
- String method,
- URI uri)
- throws ApiException {
+ public void updateParamsForAuth(String[] authNames, List queryParams, Map headerParams,
+ Map cookieParams, String payload, String method, URI uri) throws ApiException {
for (String authName : authNames) {
Authentication auth = authentications.get(authName);
if (auth == null) {
@@ -1433,8 +1364,8 @@ public RequestBody buildRequestBodyFormEncoding(Map formParams)
}
/**
- * Build a multipart (file uploading) request body with the given form parameters, which could
- * contain text fields and file fields.
+ * Build a multipart (file uploading) request body with the given form parameters,
+ * which could contain text fields and file fields.
*
* @param formParams Form parameters in the form of Map
* @return RequestBody
@@ -1447,7 +1378,7 @@ public RequestBody buildRequestBodyMultipart(Map formParams) {
addPartToMultiPartBuilder(mpBuilder, param.getKey(), file);
} else if (param.getValue() instanceof List) {
List list = (List) param.getValue();
- for (Object item : list) {
+ for (Object item: list) {
if (item instanceof File) {
addPartToMultiPartBuilder(mpBuilder, param.getKey(), (File) item);
} else {
@@ -1479,29 +1410,24 @@ public String guessContentTypeFromFile(File file) {
/**
* Add a Content-Disposition Header for the given key and file to the MultipartBody Builder.
*
- * @param mpBuilder MultipartBody.Builder
+ * @param mpBuilder MultipartBody.Builder
* @param key The key of the Header element
* @param file The file to add to the Header
- */
+ */
private void addPartToMultiPartBuilder(MultipartBody.Builder mpBuilder, String key, File file) {
- Headers partHeaders =
- Headers.of(
- "Content-Disposition",
- "form-data; name=\"" + key + "\"; filename=\"" + file.getName() + "\"");
+ Headers partHeaders = Headers.of("Content-Disposition", "form-data; name=\"" + key + "\"; filename=\"" + file.getName() + "\"");
MediaType mediaType = MediaType.parse(guessContentTypeFromFile(file));
mpBuilder.addPart(partHeaders, RequestBody.create(file, mediaType));
}
/**
- * Add a Content-Disposition Header for the given key and complex object to the MultipartBody
- * Builder.
+ * Add a Content-Disposition Header for the given key and complex object to the MultipartBody Builder.
*
* @param mpBuilder MultipartBody.Builder
* @param key The key of the Header element
* @param obj The complex object to add to the Header
*/
- private void addPartToMultiPartBuilder(
- MultipartBody.Builder mpBuilder, String key, Object obj) {
+ private void addPartToMultiPartBuilder(MultipartBody.Builder mpBuilder, String key, Object obj) {
RequestBody requestBody;
if (obj instanceof String) {
requestBody = RequestBody.create((String) obj, MediaType.parse("text/plain"));
@@ -1520,8 +1446,8 @@ private void addPartToMultiPartBuilder(
}
/**
- * Get network interceptor to add it to the httpClient to track download progress for async
- * requests.
+ * Get network interceptor to add it to the httpClient to track download progress for
+ * async requests.
*/
private Interceptor getProgressInterceptor() {
return new Interceptor() {
@@ -1531,10 +1457,9 @@ public Response intercept(Interceptor.Chain chain) throws IOException {
final Response originalResponse = chain.proceed(request);
if (request.tag() instanceof ApiCallback) {
final ApiCallback callback = (ApiCallback) request.tag();
- return originalResponse
- .newBuilder()
- .body(new ProgressResponseBody(originalResponse.body(), callback))
- .build();
+ return originalResponse.newBuilder()
+ .body(new ProgressResponseBody(originalResponse.body(), callback))
+ .build();
}
return originalResponse;
}
@@ -1542,54 +1467,47 @@ public Response intercept(Interceptor.Chain chain) throws IOException {
}
/**
- * Apply SSL related settings to httpClient according to the current values of verifyingSsl and
- * sslCaCert.
+ * Apply SSL related settings to httpClient according to the current values of
+ * verifyingSsl and sslCaCert.
*/
private void applySslSettings() {
try {
TrustManager[] trustManagers;
HostnameVerifier hostnameVerifier;
if (!verifyingSsl) {
- trustManagers =
- new TrustManager[] {
- new X509TrustManager() {
- @Override
- public void checkClientTrusted(
- java.security.cert.X509Certificate[] chain, String authType)
- throws CertificateException {}
-
- @Override
- public void checkServerTrusted(
- java.security.cert.X509Certificate[] chain, String authType)
- throws CertificateException {}
-
- @Override
- public java.security.cert.X509Certificate[] getAcceptedIssuers() {
- return new java.security.cert.X509Certificate[] {};
- }
+ trustManagers = new TrustManager[]{
+ new X509TrustManager() {
+ @Override
+ public void checkClientTrusted(java.security.cert.X509Certificate[] chain, String authType) throws CertificateException {
}
- };
- hostnameVerifier =
- new HostnameVerifier() {
+
+ @Override
+ public void checkServerTrusted(java.security.cert.X509Certificate[] chain, String authType) throws CertificateException {
+ }
+
@Override
- public boolean verify(String hostname, SSLSession session) {
- return true;
+ public java.security.cert.X509Certificate[] getAcceptedIssuers() {
+ return new java.security.cert.X509Certificate[]{};
}
- };
+ }
+ };
+ hostnameVerifier = new HostnameVerifier() {
+ @Override
+ public boolean verify(String hostname, SSLSession session) {
+ return true;
+ }
+ };
} else {
- TrustManagerFactory trustManagerFactory =
- TrustManagerFactory.getInstance(TrustManagerFactory.getDefaultAlgorithm());
+ TrustManagerFactory trustManagerFactory = TrustManagerFactory.getInstance(TrustManagerFactory.getDefaultAlgorithm());
if (sslCaCert == null) {
trustManagerFactory.init((KeyStore) null);
} else {
char[] password = null; // Any password will work.
CertificateFactory certificateFactory = CertificateFactory.getInstance("X.509");
- Collection extends Certificate> certificates =
- certificateFactory.generateCertificates(sslCaCert);
+ Collection extends Certificate> certificates = certificateFactory.generateCertificates(sslCaCert);
if (certificates.isEmpty()) {
- throw new IllegalArgumentException(
- "expected non-empty set of trusted certificates");
+ throw new IllegalArgumentException("expected non-empty set of trusted certificates");
}
KeyStore caKeyStore = newEmptyKeyStore(password);
int index = 0;
@@ -1605,12 +1523,8 @@ public boolean verify(String hostname, SSLSession session) {
SSLContext sslContext = SSLContext.getInstance("TLS");
sslContext.init(keyManagers, trustManagers, new SecureRandom());
- httpClient =
- httpClient
- .newBuilder()
- .sslSocketFactory(
- sslContext.getSocketFactory(),
- (X509TrustManager) trustManagers[0])
+ httpClient = httpClient.newBuilder()
+ .sslSocketFactory(sslContext.getSocketFactory(), (X509TrustManager) trustManagers[0])
.hostnameVerifier(hostnameVerifier)
.build();
} catch (GeneralSecurityException e) {
@@ -1633,8 +1547,7 @@ private KeyStore newEmptyKeyStore(char[] password) throws GeneralSecurityExcepti
*
* @param requestBody The HTTP request object
* @return The string representation of the HTTP request body
- * @throws com.configcat.publicapi.java.client.ApiException If fail to serialize the request
- * body object into a string
+ * @throws com.configcat.publicapi.java.client.ApiException If fail to serialize the request body object into a string
*/
private String requestBodyToString(RequestBody requestBody) throws ApiException {
if (requestBody != null) {
diff --git a/src/main/java/com/configcat/publicapi/java/client/ApiException.java b/src/main/java/com/configcat/publicapi/java/client/ApiException.java
index 4b7b478..3ea6ea1 100644
--- a/src/main/java/com/configcat/publicapi/java/client/ApiException.java
+++ b/src/main/java/com/configcat/publicapi/java/client/ApiException.java
@@ -1,6 +1,6 @@
/*
* ConfigCat Public Management API
- * The purpose of this API is to access the ConfigCat platform programmatically. You can **Create**, **Read**, **Update** and **Delete** any entities like **Feature Flags, Configs, Environments** or **Products** within ConfigCat. **Base API URL**: https://api.configcat.com If you prefer the swagger documentation, you can find it here: [Swagger UI](https://api.configcat.com/swagger). The API is based on HTTP REST, uses resource-oriented URLs, status codes and supports JSON format. **Important:** Do not use this API for accessing and evaluating feature flag values. Use the [SDKs](https://configcat.com/docs/sdk-reference/overview) or the [ConfigCat Proxy](https://configcat.com/docs/advanced/proxy/proxy-overview/) instead. # OpenAPI Specification The complete specification is publicly available in the following formats: - [OpenAPI v3](https://api.configcat.com/docs/v1/swagger.json) - [Swagger v2](https://api.configcat.com/docs/v1/swagger.v2.json) You can use it to generate client libraries in various languages with [OpenAPI Generator](https://github.com/OpenAPITools/openapi-generator) or [Swagger Codegen](https://swagger.io/tools/swagger-codegen/) to interact with this API. # Authentication This API uses the [Basic HTTP Authentication Scheme](https://en.wikipedia.org/wiki/Basic_access_authentication). # Throttling and rate limits All the rate limited API calls are returning information about the current rate limit period in the following HTTP headers: | Header | Description | | :- | :- | | X-Rate-Limit-Remaining | The maximum number of requests remaining in the current rate limit period. | | X-Rate-Limit-Reset | The time when the current rate limit period resets. | When the rate limit is exceeded by a request, the API returns with a `HTTP 429 - Too many requests` status along with a `Retry-After` HTTP header.
+ * The purpose of this API is to access the ConfigCat platform programmatically. You can **Create**, **Read**, **Update** and **Delete** any entities like **Feature Flags, Configs, Environments** or **Products** within ConfigCat. **Base API URL**: https://api.configcat.com If you prefer the swagger documentation, you can find it here: [Swagger UI](https://api.configcat.com/swagger). The API is based on HTTP REST, uses resource-oriented URLs, status codes and supports JSON format. **Important:** Do not use this API for accessing and evaluating feature flag values. Use the [SDKs](https://configcat.com/docs/sdk-reference/overview) or the [ConfigCat Proxy](https://configcat.com/docs/advanced/proxy/proxy-overview/) instead. # OpenAPI Specification The complete specification is publicly available in the following formats: - [OpenAPI v3](https://api.configcat.com/docs/v1/swagger.json) - [Swagger v2](https://api.configcat.com/docs/v1/swagger.v2.json) You can use it to generate client libraries in various languages with [OpenAPI Generator](https://github.com/OpenAPITools/openapi-generator) or [Swagger Codegen](https://swagger.io/tools/swagger-codegen/) to interact with this API. # Authentication This API uses the [Basic HTTP Authentication Scheme](https://en.wikipedia.org/wiki/Basic_access_authentication). # Throttling and rate limits All the rate limited API calls are returning information about the current rate limit period in the following HTTP headers: | Header | Description | | :- | :- | | X-Rate-Limit-Remaining | The maximum number of requests remaining in the current rate limit period. | | X-Rate-Limit-Reset | The time when the current rate limit period resets. | When the rate limit is exceeded by a request, the API returns with a `HTTP 429 - Too many requests` status along with a `Retry-After` HTTP header.
*
* The version of the OpenAPI document: v1
* Contact: support@configcat.com
@@ -10,18 +10,18 @@
* Do not edit the class manually.
*/
-package com.configcat.publicapi.java.client;
+package com.configcat.publicapi.java.client;
-import java.util.List;
import java.util.Map;
+import java.util.List;
-/** ApiException class. */
+
+/**
+ * ApiException class.
+ */
@SuppressWarnings("serial")
-@javax.annotation.Generated(
- value = "org.openapitools.codegen.languages.JavaClientCodegen",
- date = "2024-10-09T12:38:06.739118192Z[Etc/UTC]",
- comments = "Generator version: 7.7.0")
+@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-02-20T16:55:24.304297906Z[Etc/UTC]", comments = "Generator version: 7.7.0")
public class ApiException extends RuntimeException {
private static final long serialVersionUID = 1L;
@@ -29,11 +29,13 @@ public class ApiException extends RuntimeException {
private Map> responseHeaders = null;
private String responseBody = null;
- /** Constructor for ApiException. */
+ /**
+ * Constructor for ApiException.
+ */
public ApiException() {}
/**
- * Constructor for ApiException.
+ * Constructor for ApiException.
*
* @param throwable a {@link java.lang.Throwable} object
*/
@@ -42,7 +44,7 @@ public ApiException(Throwable throwable) {
}
/**
- * Constructor for ApiException.
+ * Constructor for ApiException.
*
* @param message the error message
*/
@@ -51,7 +53,7 @@ public ApiException(String message) {
}
/**
- * Constructor for ApiException.
+ * Constructor for ApiException.
*
* @param message the error message
* @param throwable a {@link java.lang.Throwable} object
@@ -59,12 +61,7 @@ public ApiException(String message) {
* @param responseHeaders a {@link java.util.Map} of HTTP response headers
* @param responseBody the response body
*/
- public ApiException(
- String message,
- Throwable throwable,
- int code,
- Map> responseHeaders,
- String responseBody) {
+ public ApiException(String message, Throwable throwable, int code, Map> responseHeaders, String responseBody) {
super(message, throwable);
this.code = code;
this.responseHeaders = responseHeaders;
@@ -72,55 +69,42 @@ public ApiException(
}
/**
- * Constructor for ApiException.
+ * Constructor for ApiException.
*
* @param message the error message
* @param code HTTP status code
* @param responseHeaders a {@link java.util.Map} of HTTP response headers
* @param responseBody the response body
*/
- public ApiException(
- String message,
- int code,
- Map> responseHeaders,
- String responseBody) {
+ public ApiException(String message, int code, Map> responseHeaders, String responseBody) {
this(message, (Throwable) null, code, responseHeaders, responseBody);
}
/**
- * Constructor for ApiException.
+ * Constructor for ApiException.
*
* @param message the error message
* @param throwable a {@link java.lang.Throwable} object
* @param code HTTP status code
* @param responseHeaders a {@link java.util.Map} of HTTP response headers
*/
- public ApiException(
- String message,
- Throwable throwable,
- int code,
- Map> responseHeaders) {
+ public ApiException(String message, Throwable throwable, int code, Map> responseHeaders) {
this(message, throwable, code, responseHeaders, null);
}
/**
- * Constructor for ApiException.
+ * Constructor for ApiException.
*
* @param code HTTP status code
* @param responseHeaders a {@link java.util.Map} of HTTP response headers
* @param responseBody the response body
*/
public ApiException(int code, Map> responseHeaders, String responseBody) {
- this(
- "Response Code: " + code + " Response Body: " + responseBody,
- (Throwable) null,
- code,
- responseHeaders,
- responseBody);
+ this("Response Code: " + code + " Response Body: " + responseBody, (Throwable) null, code, responseHeaders, responseBody);
}
/**
- * Constructor for ApiException.
+ * Constructor for ApiException.
*
* @param code HTTP status code
* @param message a {@link java.lang.String} object
@@ -131,18 +115,14 @@ public ApiException(int code, String message) {
}
/**
- * Constructor for ApiException.
+ * Constructor for ApiException.
*
* @param code HTTP status code
* @param message the error message
* @param responseHeaders a {@link java.util.Map} of HTTP response headers
* @param responseBody the response body
*/
- public ApiException(
- int code,
- String message,
- Map> responseHeaders,
- String responseBody) {
+ public ApiException(int code, String message, Map> responseHeaders, String responseBody) {
this(code, message);
this.responseHeaders = responseHeaders;
this.responseBody = responseBody;
@@ -181,12 +161,7 @@ public String getResponseBody() {
* @return The exception message
*/
public String getMessage() {
- return String.format(
- "Message: %s%nHTTP response code: %s%nHTTP response body: %s%nHTTP response"
- + " headers: %s",
- super.getMessage(),
- this.getCode(),
- this.getResponseBody(),
- this.getResponseHeaders());
+ return String.format("Message: %s%nHTTP response code: %s%nHTTP response body: %s%nHTTP response headers: %s",
+ super.getMessage(), this.getCode(), this.getResponseBody(), this.getResponseHeaders());
}
}
diff --git a/src/main/java/com/configcat/publicapi/java/client/ApiResponse.java b/src/main/java/com/configcat/publicapi/java/client/ApiResponse.java
index 3044d2e..47d753e 100644
--- a/src/main/java/com/configcat/publicapi/java/client/ApiResponse.java
+++ b/src/main/java/com/configcat/publicapi/java/client/ApiResponse.java
@@ -1,6 +1,6 @@
/*
* ConfigCat Public Management API
- * The purpose of this API is to access the ConfigCat platform programmatically. You can **Create**, **Read**, **Update** and **Delete** any entities like **Feature Flags, Configs, Environments** or **Products** within ConfigCat. **Base API URL**: https://api.configcat.com If you prefer the swagger documentation, you can find it here: [Swagger UI](https://api.configcat.com/swagger). The API is based on HTTP REST, uses resource-oriented URLs, status codes and supports JSON format. **Important:** Do not use this API for accessing and evaluating feature flag values. Use the [SDKs](https://configcat.com/docs/sdk-reference/overview) or the [ConfigCat Proxy](https://configcat.com/docs/advanced/proxy/proxy-overview/) instead. # OpenAPI Specification The complete specification is publicly available in the following formats: - [OpenAPI v3](https://api.configcat.com/docs/v1/swagger.json) - [Swagger v2](https://api.configcat.com/docs/v1/swagger.v2.json) You can use it to generate client libraries in various languages with [OpenAPI Generator](https://github.com/OpenAPITools/openapi-generator) or [Swagger Codegen](https://swagger.io/tools/swagger-codegen/) to interact with this API. # Authentication This API uses the [Basic HTTP Authentication Scheme](https://en.wikipedia.org/wiki/Basic_access_authentication). # Throttling and rate limits All the rate limited API calls are returning information about the current rate limit period in the following HTTP headers: | Header | Description | | :- | :- | | X-Rate-Limit-Remaining | The maximum number of requests remaining in the current rate limit period. | | X-Rate-Limit-Reset | The time when the current rate limit period resets. | When the rate limit is exceeded by a request, the API returns with a `HTTP 429 - Too many requests` status along with a `Retry-After` HTTP header.
+ * The purpose of this API is to access the ConfigCat platform programmatically. You can **Create**, **Read**, **Update** and **Delete** any entities like **Feature Flags, Configs, Environments** or **Products** within ConfigCat. **Base API URL**: https://api.configcat.com If you prefer the swagger documentation, you can find it here: [Swagger UI](https://api.configcat.com/swagger). The API is based on HTTP REST, uses resource-oriented URLs, status codes and supports JSON format. **Important:** Do not use this API for accessing and evaluating feature flag values. Use the [SDKs](https://configcat.com/docs/sdk-reference/overview) or the [ConfigCat Proxy](https://configcat.com/docs/advanced/proxy/proxy-overview/) instead. # OpenAPI Specification The complete specification is publicly available in the following formats: - [OpenAPI v3](https://api.configcat.com/docs/v1/swagger.json) - [Swagger v2](https://api.configcat.com/docs/v1/swagger.v2.json) You can use it to generate client libraries in various languages with [OpenAPI Generator](https://github.com/OpenAPITools/openapi-generator) or [Swagger Codegen](https://swagger.io/tools/swagger-codegen/) to interact with this API. # Authentication This API uses the [Basic HTTP Authentication Scheme](https://en.wikipedia.org/wiki/Basic_access_authentication). # Throttling and rate limits All the rate limited API calls are returning information about the current rate limit period in the following HTTP headers: | Header | Description | | :- | :- | | X-Rate-Limit-Remaining | The maximum number of requests remaining in the current rate limit period. | | X-Rate-Limit-Reset | The time when the current rate limit period resets. | When the rate limit is exceeded by a request, the API returns with a `HTTP 429 - Too many requests` status along with a `Retry-After` HTTP header.
*
* The version of the OpenAPI document: v1
* Contact: support@configcat.com
@@ -10,20 +10,22 @@
* Do not edit the class manually.
*/
-package com.configcat.publicapi.java.client;
+package com.configcat.publicapi.java.client;
import java.util.List;
import java.util.Map;
-/** API response returned by API call. */
+/**
+ * API response returned by API call.
+ */
public class ApiResponse {
- private final int statusCode;
- private final Map> headers;
- private final T data;
+ final private int statusCode;
+ final private Map> headers;
+ final private T data;
/**
- * Constructor for ApiResponse.
+ * Constructor for ApiResponse.
*
* @param statusCode The status code of HTTP response
* @param headers The headers of HTTP response
@@ -33,7 +35,7 @@ public ApiResponse(int statusCode, Map> headers) {
}
/**
- * Constructor for ApiResponse.
+ * Constructor for ApiResponse.
*
* @param statusCode The status code of HTTP response
* @param headers The headers of HTTP response
@@ -46,7 +48,7 @@ public ApiResponse(int statusCode, Map> headers, T data) {
}
/**
- * Get the status code.
+ * Get the status code.
*
* @return the status code
*/
@@ -55,16 +57,16 @@ public int getStatusCode() {
}
/**
- * Get the headers.
+ * Get the headers.
*
- * @return a {@link java.util.Map} of headers
+ * @return a {@link java.util.Map} of headers
*/
public Map> getHeaders() {
return headers;
}
/**
- * Get the data.
+ * Get the data.
*
* @return the data
*/
diff --git a/src/main/java/com/configcat/publicapi/java/client/Configuration.java b/src/main/java/com/configcat/publicapi/java/client/Configuration.java
index aacf3a5..c6baed3 100644
--- a/src/main/java/com/configcat/publicapi/java/client/Configuration.java
+++ b/src/main/java/com/configcat/publicapi/java/client/Configuration.java
@@ -1,6 +1,6 @@
/*
* ConfigCat Public Management API
- * The purpose of this API is to access the ConfigCat platform programmatically. You can **Create**, **Read**, **Update** and **Delete** any entities like **Feature Flags, Configs, Environments** or **Products** within ConfigCat. **Base API URL**: https://api.configcat.com If you prefer the swagger documentation, you can find it here: [Swagger UI](https://api.configcat.com/swagger). The API is based on HTTP REST, uses resource-oriented URLs, status codes and supports JSON format. **Important:** Do not use this API for accessing and evaluating feature flag values. Use the [SDKs](https://configcat.com/docs/sdk-reference/overview) or the [ConfigCat Proxy](https://configcat.com/docs/advanced/proxy/proxy-overview/) instead. # OpenAPI Specification The complete specification is publicly available in the following formats: - [OpenAPI v3](https://api.configcat.com/docs/v1/swagger.json) - [Swagger v2](https://api.configcat.com/docs/v1/swagger.v2.json) You can use it to generate client libraries in various languages with [OpenAPI Generator](https://github.com/OpenAPITools/openapi-generator) or [Swagger Codegen](https://swagger.io/tools/swagger-codegen/) to interact with this API. # Authentication This API uses the [Basic HTTP Authentication Scheme](https://en.wikipedia.org/wiki/Basic_access_authentication). # Throttling and rate limits All the rate limited API calls are returning information about the current rate limit period in the following HTTP headers: | Header | Description | | :- | :- | | X-Rate-Limit-Remaining | The maximum number of requests remaining in the current rate limit period. | | X-Rate-Limit-Reset | The time when the current rate limit period resets. | When the rate limit is exceeded by a request, the API returns with a `HTTP 429 - Too many requests` status along with a `Retry-After` HTTP header.
+ * The purpose of this API is to access the ConfigCat platform programmatically. You can **Create**, **Read**, **Update** and **Delete** any entities like **Feature Flags, Configs, Environments** or **Products** within ConfigCat. **Base API URL**: https://api.configcat.com If you prefer the swagger documentation, you can find it here: [Swagger UI](https://api.configcat.com/swagger). The API is based on HTTP REST, uses resource-oriented URLs, status codes and supports JSON format. **Important:** Do not use this API for accessing and evaluating feature flag values. Use the [SDKs](https://configcat.com/docs/sdk-reference/overview) or the [ConfigCat Proxy](https://configcat.com/docs/advanced/proxy/proxy-overview/) instead. # OpenAPI Specification The complete specification is publicly available in the following formats: - [OpenAPI v3](https://api.configcat.com/docs/v1/swagger.json) - [Swagger v2](https://api.configcat.com/docs/v1/swagger.v2.json) You can use it to generate client libraries in various languages with [OpenAPI Generator](https://github.com/OpenAPITools/openapi-generator) or [Swagger Codegen](https://swagger.io/tools/swagger-codegen/) to interact with this API. # Authentication This API uses the [Basic HTTP Authentication Scheme](https://en.wikipedia.org/wiki/Basic_access_authentication). # Throttling and rate limits All the rate limited API calls are returning information about the current rate limit period in the following HTTP headers: | Header | Description | | :- | :- | | X-Rate-Limit-Remaining | The maximum number of requests remaining in the current rate limit period. | | X-Rate-Limit-Reset | The time when the current rate limit period resets. | When the rate limit is exceeded by a request, the API returns with a `HTTP 429 - Too many requests` status along with a `Retry-After` HTTP header.
*
* The version of the OpenAPI document: v1
* Contact: support@configcat.com
@@ -10,20 +10,18 @@
* Do not edit the class manually.
*/
+
package com.configcat.publicapi.java.client;
-@javax.annotation.Generated(
- value = "org.openapitools.codegen.languages.JavaClientCodegen",
- date = "2024-10-09T12:38:06.739118192Z[Etc/UTC]",
- comments = "Generator version: 7.7.0")
+@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-02-20T16:55:24.304297906Z[Etc/UTC]", comments = "Generator version: 7.7.0")
public class Configuration {
public static final String VERSION = "v1";
private static ApiClient defaultApiClient = new ApiClient();
/**
- * Get the default API client, which would be used when creating API instances without providing
- * an API client.
+ * Get the default API client, which would be used when creating API
+ * instances without providing an API client.
*
* @return Default API client
*/
@@ -32,8 +30,8 @@ public static ApiClient getDefaultApiClient() {
}
/**
- * Set the default API client, which would be used when creating API instances without providing
- * an API client.
+ * Set the default API client, which would be used when creating API
+ * instances without providing an API client.
*
* @param apiClient API client
*/
diff --git a/src/main/java/com/configcat/publicapi/java/client/GzipRequestInterceptor.java b/src/main/java/com/configcat/publicapi/java/client/GzipRequestInterceptor.java
index 8364f64..1d17be4 100644
--- a/src/main/java/com/configcat/publicapi/java/client/GzipRequestInterceptor.java
+++ b/src/main/java/com/configcat/publicapi/java/client/GzipRequestInterceptor.java
@@ -1,6 +1,6 @@
/*
* ConfigCat Public Management API
- * The purpose of this API is to access the ConfigCat platform programmatically. You can **Create**, **Read**, **Update** and **Delete** any entities like **Feature Flags, Configs, Environments** or **Products** within ConfigCat. **Base API URL**: https://api.configcat.com If you prefer the swagger documentation, you can find it here: [Swagger UI](https://api.configcat.com/swagger). The API is based on HTTP REST, uses resource-oriented URLs, status codes and supports JSON format. **Important:** Do not use this API for accessing and evaluating feature flag values. Use the [SDKs](https://configcat.com/docs/sdk-reference/overview) or the [ConfigCat Proxy](https://configcat.com/docs/advanced/proxy/proxy-overview/) instead. # OpenAPI Specification The complete specification is publicly available in the following formats: - [OpenAPI v3](https://api.configcat.com/docs/v1/swagger.json) - [Swagger v2](https://api.configcat.com/docs/v1/swagger.v2.json) You can use it to generate client libraries in various languages with [OpenAPI Generator](https://github.com/OpenAPITools/openapi-generator) or [Swagger Codegen](https://swagger.io/tools/swagger-codegen/) to interact with this API. # Authentication This API uses the [Basic HTTP Authentication Scheme](https://en.wikipedia.org/wiki/Basic_access_authentication). # Throttling and rate limits All the rate limited API calls are returning information about the current rate limit period in the following HTTP headers: | Header | Description | | :- | :- | | X-Rate-Limit-Remaining | The maximum number of requests remaining in the current rate limit period. | | X-Rate-Limit-Reset | The time when the current rate limit period resets. | When the rate limit is exceeded by a request, the API returns with a `HTTP 429 - Too many requests` status along with a `Retry-After` HTTP header.
+ * The purpose of this API is to access the ConfigCat platform programmatically. You can **Create**, **Read**, **Update** and **Delete** any entities like **Feature Flags, Configs, Environments** or **Products** within ConfigCat. **Base API URL**: https://api.configcat.com If you prefer the swagger documentation, you can find it here: [Swagger UI](https://api.configcat.com/swagger). The API is based on HTTP REST, uses resource-oriented URLs, status codes and supports JSON format. **Important:** Do not use this API for accessing and evaluating feature flag values. Use the [SDKs](https://configcat.com/docs/sdk-reference/overview) or the [ConfigCat Proxy](https://configcat.com/docs/advanced/proxy/proxy-overview/) instead. # OpenAPI Specification The complete specification is publicly available in the following formats: - [OpenAPI v3](https://api.configcat.com/docs/v1/swagger.json) - [Swagger v2](https://api.configcat.com/docs/v1/swagger.v2.json) You can use it to generate client libraries in various languages with [OpenAPI Generator](https://github.com/OpenAPITools/openapi-generator) or [Swagger Codegen](https://swagger.io/tools/swagger-codegen/) to interact with this API. # Authentication This API uses the [Basic HTTP Authentication Scheme](https://en.wikipedia.org/wiki/Basic_access_authentication). # Throttling and rate limits All the rate limited API calls are returning information about the current rate limit period in the following HTTP headers: | Header | Description | | :- | :- | | X-Rate-Limit-Remaining | The maximum number of requests remaining in the current rate limit period. | | X-Rate-Limit-Reset | The time when the current rate limit period resets. | When the rate limit is exceeded by a request, the API returns with a `HTTP 429 - Too many requests` status along with a `Retry-After` HTTP header.
*
* The version of the OpenAPI document: v1
* Contact: support@configcat.com
@@ -10,20 +10,21 @@
* Do not edit the class manually.
*/
-package com.configcat.publicapi.java.client;
+package com.configcat.publicapi.java.client;
-import java.io.IOException;
import okhttp3.*;
import okio.Buffer;
import okio.BufferedSink;
import okio.GzipSink;
import okio.Okio;
+import java.io.IOException;
+
/**
* Encodes request bodies using gzip.
*
- * Taken from https://github.com/square/okhttp/issues/350
+ * Taken from https://github.com/square/okhttp/issues/350
*/
class GzipRequestInterceptor implements Interceptor {
@Override
@@ -33,14 +34,10 @@ public Response intercept(Chain chain) throws IOException {
return chain.proceed(originalRequest);
}
- Request compressedRequest =
- originalRequest
- .newBuilder()
- .header("Content-Encoding", "gzip")
- .method(
- originalRequest.method(),
- forceContentLength(gzip(originalRequest.body())))
- .build();
+ Request compressedRequest = originalRequest.newBuilder()
+ .header("Content-Encoding", "gzip")
+ .method(originalRequest.method(), forceContentLength(gzip(originalRequest.body())))
+ .build();
return chain.proceed(compressedRequest);
}
diff --git a/src/main/java/com/configcat/publicapi/java/client/JSON.java b/src/main/java/com/configcat/publicapi/java/client/JSON.java
index f16bf59..3892933 100644
--- a/src/main/java/com/configcat/publicapi/java/client/JSON.java
+++ b/src/main/java/com/configcat/publicapi/java/client/JSON.java
@@ -1,6 +1,6 @@
/*
* ConfigCat Public Management API
- * The purpose of this API is to access the ConfigCat platform programmatically. You can **Create**, **Read**, **Update** and **Delete** any entities like **Feature Flags, Configs, Environments** or **Products** within ConfigCat. **Base API URL**: https://api.configcat.com If you prefer the swagger documentation, you can find it here: [Swagger UI](https://api.configcat.com/swagger). The API is based on HTTP REST, uses resource-oriented URLs, status codes and supports JSON format. **Important:** Do not use this API for accessing and evaluating feature flag values. Use the [SDKs](https://configcat.com/docs/sdk-reference/overview) or the [ConfigCat Proxy](https://configcat.com/docs/advanced/proxy/proxy-overview/) instead. # OpenAPI Specification The complete specification is publicly available in the following formats: - [OpenAPI v3](https://api.configcat.com/docs/v1/swagger.json) - [Swagger v2](https://api.configcat.com/docs/v1/swagger.v2.json) You can use it to generate client libraries in various languages with [OpenAPI Generator](https://github.com/OpenAPITools/openapi-generator) or [Swagger Codegen](https://swagger.io/tools/swagger-codegen/) to interact with this API. # Authentication This API uses the [Basic HTTP Authentication Scheme](https://en.wikipedia.org/wiki/Basic_access_authentication). # Throttling and rate limits All the rate limited API calls are returning information about the current rate limit period in the following HTTP headers: | Header | Description | | :- | :- | | X-Rate-Limit-Remaining | The maximum number of requests remaining in the current rate limit period. | | X-Rate-Limit-Reset | The time when the current rate limit period resets. | When the rate limit is exceeded by a request, the API returns with a `HTTP 429 - Too many requests` status along with a `Retry-After` HTTP header.
+ * The purpose of this API is to access the ConfigCat platform programmatically. You can **Create**, **Read**, **Update** and **Delete** any entities like **Feature Flags, Configs, Environments** or **Products** within ConfigCat. **Base API URL**: https://api.configcat.com If you prefer the swagger documentation, you can find it here: [Swagger UI](https://api.configcat.com/swagger). The API is based on HTTP REST, uses resource-oriented URLs, status codes and supports JSON format. **Important:** Do not use this API for accessing and evaluating feature flag values. Use the [SDKs](https://configcat.com/docs/sdk-reference/overview) or the [ConfigCat Proxy](https://configcat.com/docs/advanced/proxy/proxy-overview/) instead. # OpenAPI Specification The complete specification is publicly available in the following formats: - [OpenAPI v3](https://api.configcat.com/docs/v1/swagger.json) - [Swagger v2](https://api.configcat.com/docs/v1/swagger.v2.json) You can use it to generate client libraries in various languages with [OpenAPI Generator](https://github.com/OpenAPITools/openapi-generator) or [Swagger Codegen](https://swagger.io/tools/swagger-codegen/) to interact with this API. # Authentication This API uses the [Basic HTTP Authentication Scheme](https://en.wikipedia.org/wiki/Basic_access_authentication). # Throttling and rate limits All the rate limited API calls are returning information about the current rate limit period in the following HTTP headers: | Header | Description | | :- | :- | | X-Rate-Limit-Remaining | The maximum number of requests remaining in the current rate limit period. | | X-Rate-Limit-Reset | The time when the current rate limit period resets. | When the rate limit is exceeded by a request, the API returns with a `HTTP 429 - Too many requests` status along with a `Retry-After` HTTP header.
*
* The version of the OpenAPI document: v1
* Contact: support@configcat.com
@@ -10,18 +10,22 @@
* Do not edit the class manually.
*/
-package com.configcat.publicapi.java.client;
+package com.configcat.publicapi.java.client;
import com.google.gson.Gson;
import com.google.gson.GsonBuilder;
-import com.google.gson.JsonElement;
import com.google.gson.JsonParseException;
import com.google.gson.TypeAdapter;
import com.google.gson.internal.bind.util.ISO8601Utils;
import com.google.gson.stream.JsonReader;
import com.google.gson.stream.JsonWriter;
+import com.google.gson.JsonElement;
import io.gsonfire.GsonFireBuilder;
+import io.gsonfire.TypeSelector;
+
+import okio.ByteString;
+
import java.io.IOException;
import java.io.StringReader;
import java.lang.reflect.Type;
@@ -32,8 +36,9 @@
import java.time.OffsetDateTime;
import java.time.format.DateTimeFormatter;
import java.util.Date;
+import java.util.Locale;
import java.util.Map;
-import okio.ByteString;
+import java.util.HashMap;
/*
* A JSON utility class
@@ -46,42 +51,37 @@ public class JSON {
private static boolean isLenientOnJson = false;
private static DateTypeAdapter dateTypeAdapter = new DateTypeAdapter();
private static SqlDateTypeAdapter sqlDateTypeAdapter = new SqlDateTypeAdapter();
- private static OffsetDateTimeTypeAdapter offsetDateTimeTypeAdapter =
- new OffsetDateTimeTypeAdapter();
+ private static OffsetDateTimeTypeAdapter offsetDateTimeTypeAdapter = new OffsetDateTimeTypeAdapter();
private static LocalDateTypeAdapter localDateTypeAdapter = new LocalDateTypeAdapter();
private static ByteArrayAdapter byteArrayAdapter = new ByteArrayAdapter();
@SuppressWarnings("unchecked")
public static GsonBuilder createGson() {
- GsonFireBuilder fireBuilder = new GsonFireBuilder();
+ GsonFireBuilder fireBuilder = new GsonFireBuilder()
+ ;
GsonBuilder builder = fireBuilder.createGsonBuilder();
return builder;
}
- private static String getDiscriminatorValue(
- JsonElement readElement, String discriminatorField) {
+ private static String getDiscriminatorValue(JsonElement readElement, String discriminatorField) {
JsonElement element = readElement.getAsJsonObject().get(discriminatorField);
if (null == element) {
- throw new IllegalArgumentException(
- "missing discriminator field: <" + discriminatorField + ">");
+ throw new IllegalArgumentException("missing discriminator field: <" + discriminatorField + ">");
}
return element.getAsString();
}
/**
- * Returns the Java class that implements the OpenAPI schema for the specified discriminator
- * value.
+ * Returns the Java class that implements the OpenAPI schema for the specified discriminator value.
*
* @param classByDiscriminatorValue The map of discriminator values to Java classes.
* @param discriminatorValue The value of the OpenAPI discriminator in the input data.
* @return The Java class that implements the OpenAPI schema
*/
- private static Class getClassByDiscriminator(
- Map classByDiscriminatorValue, String discriminatorValue) {
+ private static Class getClassByDiscriminator(Map classByDiscriminatorValue, String discriminatorValue) {
Class clazz = (Class) classByDiscriminatorValue.get(discriminatorValue);
if (null == clazz) {
- throw new IllegalArgumentException(
- "cannot determine model class of name: <" + discriminatorValue + ">");
+ throw new IllegalArgumentException("cannot determine model class of name: <" + discriminatorValue + ">");
}
return clazz;
}
@@ -93,288 +93,101 @@ private static Class getClassByDiscriminator(
gsonBuilder.registerTypeAdapter(OffsetDateTime.class, offsetDateTimeTypeAdapter);
gsonBuilder.registerTypeAdapter(LocalDate.class, localDateTypeAdapter);
gsonBuilder.registerTypeAdapter(byte[].class, byteArrayAdapter);
- gsonBuilder.registerTypeAdapterFactory(
- new com.configcat.publicapi.java.client.model.AddOrUpdateIntegrationLinkModel
- .CustomTypeAdapterFactory());
- gsonBuilder.registerTypeAdapterFactory(
- new com.configcat.publicapi.java.client.model.AddOrUpdateJiraIntegrationLinkModel
- .CustomTypeAdapterFactory());
- gsonBuilder.registerTypeAdapterFactory(
- new com.configcat.publicapi.java.client.model.AuditLogItemModel
- .CustomTypeAdapterFactory());
- gsonBuilder.registerTypeAdapterFactory(
- new com.configcat.publicapi.java.client.model.CodeReferenceModel
- .CustomTypeAdapterFactory());
- gsonBuilder.registerTypeAdapterFactory(
- new com.configcat.publicapi.java.client.model.CodeReferenceRequest
- .CustomTypeAdapterFactory());
- gsonBuilder.registerTypeAdapterFactory(
- new com.configcat.publicapi.java.client.model.ComparisonValueListModel
- .CustomTypeAdapterFactory());
- gsonBuilder.registerTypeAdapterFactory(
- new com.configcat.publicapi.java.client.model.ComparisonValueModel
- .CustomTypeAdapterFactory());
- gsonBuilder.registerTypeAdapterFactory(
- new com.configcat.publicapi.java.client.model.ConditionModel
- .CustomTypeAdapterFactory());
- gsonBuilder.registerTypeAdapterFactory(
- new com.configcat.publicapi.java.client.model.ConfigModel
- .CustomTypeAdapterFactory());
- gsonBuilder.registerTypeAdapterFactory(
- new com.configcat.publicapi.java.client.model.ConfigSettingFormulaModel
- .CustomTypeAdapterFactory());
- gsonBuilder.registerTypeAdapterFactory(
- new com.configcat.publicapi.java.client.model.ConfigSettingFormulasModel
- .CustomTypeAdapterFactory());
- gsonBuilder.registerTypeAdapterFactory(
- new com.configcat.publicapi.java.client.model.ConfigSettingValueModel
- .CustomTypeAdapterFactory());
- gsonBuilder.registerTypeAdapterFactory(
- new com.configcat.publicapi.java.client.model.ConfigSettingValuesModel
- .CustomTypeAdapterFactory());
- gsonBuilder.registerTypeAdapterFactory(
- new com.configcat.publicapi.java.client.model.ConnectRequest
- .CustomTypeAdapterFactory());
- gsonBuilder.registerTypeAdapterFactory(
- new com.configcat.publicapi.java.client.model.CreateConfigRequest
- .CustomTypeAdapterFactory());
- gsonBuilder.registerTypeAdapterFactory(
- new com.configcat.publicapi.java.client.model.CreateEnvironmentModel
- .CustomTypeAdapterFactory());
- gsonBuilder.registerTypeAdapterFactory(
- new com.configcat.publicapi.java.client.model.CreateIntegrationModel
- .CustomTypeAdapterFactory());
- gsonBuilder.registerTypeAdapterFactory(
- new com.configcat.publicapi.java.client.model.CreateOrUpdateEnvironmentAccessModel
- .CustomTypeAdapterFactory());
- gsonBuilder.registerTypeAdapterFactory(
- new com.configcat.publicapi.java.client.model.CreatePermissionGroupRequest
- .CustomTypeAdapterFactory());
- gsonBuilder.registerTypeAdapterFactory(
- new com.configcat.publicapi.java.client.model.CreateProductRequest
- .CustomTypeAdapterFactory());
- gsonBuilder.registerTypeAdapterFactory(
- new com.configcat.publicapi.java.client.model.CreateSegmentModel
- .CustomTypeAdapterFactory());
- gsonBuilder.registerTypeAdapterFactory(
- new com.configcat.publicapi.java.client.model.CreateSettingInitialValues
- .CustomTypeAdapterFactory());
- gsonBuilder.registerTypeAdapterFactory(
- new com.configcat.publicapi.java.client.model.CreateTagModel
- .CustomTypeAdapterFactory());
- gsonBuilder.registerTypeAdapterFactory(
- new com.configcat.publicapi.java.client.model.DeleteIntegrationLinkModel
- .CustomTypeAdapterFactory());
- gsonBuilder.registerTypeAdapterFactory(
- new com.configcat.publicapi.java.client.model.DeleteRepositoryReportsRequest
- .CustomTypeAdapterFactory());
- gsonBuilder.registerTypeAdapterFactory(
- new com.configcat.publicapi.java.client.model.EnvironmentAccessModel
- .CustomTypeAdapterFactory());
- gsonBuilder.registerTypeAdapterFactory(
- new com.configcat.publicapi.java.client.model.EnvironmentModel
- .CustomTypeAdapterFactory());
- gsonBuilder.registerTypeAdapterFactory(
- new com.configcat.publicapi.java.client.model.FeatureFlagLimitations
- .CustomTypeAdapterFactory());
- gsonBuilder.registerTypeAdapterFactory(
- new com.configcat.publicapi.java.client.model.FlagReference
- .CustomTypeAdapterFactory());
- gsonBuilder.registerTypeAdapterFactory(
- new com.configcat.publicapi.java.client.model.InitialValue
- .CustomTypeAdapterFactory());
- gsonBuilder.registerTypeAdapterFactory(
- new com.configcat.publicapi.java.client.model.IntegrationLinkDetail
- .CustomTypeAdapterFactory());
- gsonBuilder.registerTypeAdapterFactory(
- new com.configcat.publicapi.java.client.model.IntegrationLinkDetailsModel
- .CustomTypeAdapterFactory());
- gsonBuilder.registerTypeAdapterFactory(
- new com.configcat.publicapi.java.client.model.IntegrationLinkModel
- .CustomTypeAdapterFactory());
- gsonBuilder.registerTypeAdapterFactory(
- new com.configcat.publicapi.java.client.model.IntegrationModel
- .CustomTypeAdapterFactory());
- gsonBuilder.registerTypeAdapterFactory(
- new com.configcat.publicapi.java.client.model.IntegrationsModel
- .CustomTypeAdapterFactory());
- gsonBuilder.registerTypeAdapterFactory(
- new com.configcat.publicapi.java.client.model.InvitationModel
- .CustomTypeAdapterFactory());
- gsonBuilder.registerTypeAdapterFactory(
- new com.configcat.publicapi.java.client.model.InviteMembersRequest
- .CustomTypeAdapterFactory());
- gsonBuilder.registerTypeAdapterFactory(
- new com.configcat.publicapi.java.client.model.JsonPatchOperation
- .CustomTypeAdapterFactory());
- gsonBuilder.registerTypeAdapterFactory(
- new com.configcat.publicapi.java.client.model.MeModel.CustomTypeAdapterFactory());
- gsonBuilder.registerTypeAdapterFactory(
- new com.configcat.publicapi.java.client.model.MemberModel
- .CustomTypeAdapterFactory());
- gsonBuilder.registerTypeAdapterFactory(
- new com.configcat.publicapi.java.client.model.ModifyIntegrationRequest
- .CustomTypeAdapterFactory());
- gsonBuilder.registerTypeAdapterFactory(
- new com.configcat.publicapi.java.client.model.OrganizationAdminModel
- .CustomTypeAdapterFactory());
- gsonBuilder.registerTypeAdapterFactory(
- new com.configcat.publicapi.java.client.model.OrganizationInvitationModel
- .CustomTypeAdapterFactory());
- gsonBuilder.registerTypeAdapterFactory(
- new com.configcat.publicapi.java.client.model.OrganizationMemberModel
- .CustomTypeAdapterFactory());
- gsonBuilder.registerTypeAdapterFactory(
- new com.configcat.publicapi.java.client.model.OrganizationMembersModel
- .CustomTypeAdapterFactory());
- gsonBuilder.registerTypeAdapterFactory(
- new com.configcat.publicapi.java.client.model.OrganizationModel
- .CustomTypeAdapterFactory());
- gsonBuilder.registerTypeAdapterFactory(
- new com.configcat.publicapi.java.client.model.OrganizationPermissionGroupModel
- .CustomTypeAdapterFactory());
- gsonBuilder.registerTypeAdapterFactory(
- new com.configcat.publicapi.java.client.model.OrganizationPermissionModel
- .CustomTypeAdapterFactory());
- gsonBuilder.registerTypeAdapterFactory(
- new com.configcat.publicapi.java.client.model.OrganizationProductModel
- .CustomTypeAdapterFactory());
- gsonBuilder.registerTypeAdapterFactory(
- new com.configcat.publicapi.java.client.model.PercentageOptionModel
- .CustomTypeAdapterFactory());
- gsonBuilder.registerTypeAdapterFactory(
- new com.configcat.publicapi.java.client.model.PermissionGroupModel
- .CustomTypeAdapterFactory());
- gsonBuilder.registerTypeAdapterFactory(
- new com.configcat.publicapi.java.client.model.PreferencesModel
- .CustomTypeAdapterFactory());
- gsonBuilder.registerTypeAdapterFactory(
- new com.configcat.publicapi.java.client.model.PrerequisiteFlagConditionModel
- .CustomTypeAdapterFactory());
- gsonBuilder.registerTypeAdapterFactory(
- new com.configcat.publicapi.java.client.model.ProductModel
- .CustomTypeAdapterFactory());
- gsonBuilder.registerTypeAdapterFactory(
- new com.configcat.publicapi.java.client.model.ReasonRequiredEnvironmentModel
- .CustomTypeAdapterFactory());
- gsonBuilder.registerTypeAdapterFactory(
- new com.configcat.publicapi.java.client.model.ReferenceLine
- .CustomTypeAdapterFactory());
- gsonBuilder.registerTypeAdapterFactory(
- new com.configcat.publicapi.java.client.model.ReferenceLines
- .CustomTypeAdapterFactory());
- gsonBuilder.registerTypeAdapterFactory(
- new com.configcat.publicapi.java.client.model.ReplaceSettingModel
- .CustomTypeAdapterFactory());
- gsonBuilder.registerTypeAdapterFactory(
- new com.configcat.publicapi.java.client.model.RolloutPercentageItemModel
- .CustomTypeAdapterFactory());
- gsonBuilder.registerTypeAdapterFactory(
- new com.configcat.publicapi.java.client.model.RolloutRuleModel
- .CustomTypeAdapterFactory());
- gsonBuilder.registerTypeAdapterFactory(
- new com.configcat.publicapi.java.client.model.SdkKeysModel
- .CustomTypeAdapterFactory());
- gsonBuilder.registerTypeAdapterFactory(
- new com.configcat.publicapi.java.client.model.SegmentConditionModel
- .CustomTypeAdapterFactory());
- gsonBuilder.registerTypeAdapterFactory(
- new com.configcat.publicapi.java.client.model.SegmentListModel
- .CustomTypeAdapterFactory());
- gsonBuilder.registerTypeAdapterFactory(
- new com.configcat.publicapi.java.client.model.SegmentModel
- .CustomTypeAdapterFactory());
- gsonBuilder.registerTypeAdapterFactory(
- new com.configcat.publicapi.java.client.model.SettingDataModel
- .CustomTypeAdapterFactory());
- gsonBuilder.registerTypeAdapterFactory(
- new com.configcat.publicapi.java.client.model.SettingFormulaModel
- .CustomTypeAdapterFactory());
- gsonBuilder.registerTypeAdapterFactory(
- new com.configcat.publicapi.java.client.model.SettingModel
- .CustomTypeAdapterFactory());
- gsonBuilder.registerTypeAdapterFactory(
- new com.configcat.publicapi.java.client.model.SettingTagModel
- .CustomTypeAdapterFactory());
- gsonBuilder.registerTypeAdapterFactory(
- new com.configcat.publicapi.java.client.model.SettingValueModel
- .CustomTypeAdapterFactory());
- gsonBuilder.registerTypeAdapterFactory(
- new com.configcat.publicapi.java.client.model.TagModel.CustomTypeAdapterFactory());
- gsonBuilder.registerTypeAdapterFactory(
- new com.configcat.publicapi.java.client.model.TargetingRuleModel
- .CustomTypeAdapterFactory());
- gsonBuilder.registerTypeAdapterFactory(
- new com.configcat.publicapi.java.client.model.UpdateConfigRequest
- .CustomTypeAdapterFactory());
- gsonBuilder.registerTypeAdapterFactory(
- new com.configcat.publicapi.java.client.model.UpdateEnvironmentModel
- .CustomTypeAdapterFactory());
- gsonBuilder.registerTypeAdapterFactory(
- new com.configcat.publicapi.java.client.model.UpdateEvaluationFormulaModel
- .CustomTypeAdapterFactory());
- gsonBuilder.registerTypeAdapterFactory(
- new com.configcat.publicapi.java.client.model.UpdateEvaluationFormulaWithIdModel
- .CustomTypeAdapterFactory());
- gsonBuilder.registerTypeAdapterFactory(
- new com.configcat.publicapi.java.client.model.UpdateEvaluationFormulasModel
- .CustomTypeAdapterFactory());
- gsonBuilder.registerTypeAdapterFactory(
- new com.configcat.publicapi.java.client.model.UpdateMemberPermissionsRequest
- .CustomTypeAdapterFactory());
- gsonBuilder.registerTypeAdapterFactory(
- new com.configcat.publicapi.java.client.model.UpdatePermissionGroupRequest
- .CustomTypeAdapterFactory());
- gsonBuilder.registerTypeAdapterFactory(
- new com.configcat.publicapi.java.client.model.UpdatePreferencesRequest
- .CustomTypeAdapterFactory());
- gsonBuilder.registerTypeAdapterFactory(
- new com.configcat.publicapi.java.client.model.UpdateProductRequest
- .CustomTypeAdapterFactory());
- gsonBuilder.registerTypeAdapterFactory(
- new com.configcat.publicapi.java.client.model.UpdateReasonRequiredEnvironmentModel
- .CustomTypeAdapterFactory());
- gsonBuilder.registerTypeAdapterFactory(
- new com.configcat.publicapi.java.client.model.UpdateSegmentModel
- .CustomTypeAdapterFactory());
- gsonBuilder.registerTypeAdapterFactory(
- new com.configcat.publicapi.java.client.model.UpdateSettingValueModel
- .CustomTypeAdapterFactory());
- gsonBuilder.registerTypeAdapterFactory(
- new com.configcat.publicapi.java.client.model.UpdateSettingValueWithSettingIdModel
- .CustomTypeAdapterFactory());
- gsonBuilder.registerTypeAdapterFactory(
- new com.configcat.publicapi.java.client.model.UpdateSettingValuesWithIdModel
- .CustomTypeAdapterFactory());
- gsonBuilder.registerTypeAdapterFactory(
- new com.configcat.publicapi.java.client.model.UpdateTagModel
- .CustomTypeAdapterFactory());
- gsonBuilder.registerTypeAdapterFactory(
- new com.configcat.publicapi.java.client.model.UserConditionModel
- .CustomTypeAdapterFactory());
- gsonBuilder.registerTypeAdapterFactory(
- new com.configcat.publicapi.java.client.model.UserModel.CustomTypeAdapterFactory());
- gsonBuilder.registerTypeAdapterFactory(
- new com.configcat.publicapi.java.client.model.ValueModel
- .CustomTypeAdapterFactory());
- gsonBuilder.registerTypeAdapterFactory(
- new com.configcat.publicapi.java.client.model.WebHookRequest
- .CustomTypeAdapterFactory());
- gsonBuilder.registerTypeAdapterFactory(
- new com.configcat.publicapi.java.client.model.WebhookConfig
- .CustomTypeAdapterFactory());
- gsonBuilder.registerTypeAdapterFactory(
- new com.configcat.publicapi.java.client.model.WebhookEnvironment
- .CustomTypeAdapterFactory());
- gsonBuilder.registerTypeAdapterFactory(
- new com.configcat.publicapi.java.client.model.WebhookHeaderModel
- .CustomTypeAdapterFactory());
- gsonBuilder.registerTypeAdapterFactory(
- new com.configcat.publicapi.java.client.model.WebhookModel
- .CustomTypeAdapterFactory());
- gsonBuilder.registerTypeAdapterFactory(
- new com.configcat.publicapi.java.client.model.WebhookSigningKeysModel
- .CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new com.configcat.publicapi.java.client.model.AddOrUpdateIntegrationLinkModel.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new com.configcat.publicapi.java.client.model.AddOrUpdateJiraIntegrationLinkModel.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new com.configcat.publicapi.java.client.model.AuditLogItemModel.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new com.configcat.publicapi.java.client.model.CodeReferenceModel.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new com.configcat.publicapi.java.client.model.CodeReferenceRequest.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new com.configcat.publicapi.java.client.model.ComparisonValueListModel.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new com.configcat.publicapi.java.client.model.ComparisonValueModel.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new com.configcat.publicapi.java.client.model.ConditionModel.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new com.configcat.publicapi.java.client.model.ConfigModel.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new com.configcat.publicapi.java.client.model.ConfigSettingFormulaModel.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new com.configcat.publicapi.java.client.model.ConfigSettingFormulasModel.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new com.configcat.publicapi.java.client.model.ConfigSettingValueModel.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new com.configcat.publicapi.java.client.model.ConfigSettingValuesModel.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new com.configcat.publicapi.java.client.model.ConnectRequest.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new com.configcat.publicapi.java.client.model.CreateConfigRequest.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new com.configcat.publicapi.java.client.model.CreateEnvironmentModel.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new com.configcat.publicapi.java.client.model.CreateIntegrationModel.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new com.configcat.publicapi.java.client.model.CreateOrUpdateEnvironmentAccessModel.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new com.configcat.publicapi.java.client.model.CreatePermissionGroupRequest.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new com.configcat.publicapi.java.client.model.CreateProductRequest.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new com.configcat.publicapi.java.client.model.CreateSegmentModel.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new com.configcat.publicapi.java.client.model.CreateSettingInitialValues.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new com.configcat.publicapi.java.client.model.CreateTagModel.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new com.configcat.publicapi.java.client.model.DeleteIntegrationLinkModel.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new com.configcat.publicapi.java.client.model.DeleteRepositoryReportsRequest.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new com.configcat.publicapi.java.client.model.EnvironmentAccessModel.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new com.configcat.publicapi.java.client.model.EnvironmentModel.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new com.configcat.publicapi.java.client.model.FeatureFlagLimitations.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new com.configcat.publicapi.java.client.model.FlagReference.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new com.configcat.publicapi.java.client.model.InitialValue.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new com.configcat.publicapi.java.client.model.IntegrationLinkDetail.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new com.configcat.publicapi.java.client.model.IntegrationLinkDetailsModel.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new com.configcat.publicapi.java.client.model.IntegrationLinkModel.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new com.configcat.publicapi.java.client.model.IntegrationModel.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new com.configcat.publicapi.java.client.model.IntegrationsModel.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new com.configcat.publicapi.java.client.model.InvitationModel.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new com.configcat.publicapi.java.client.model.InviteMembersRequest.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new com.configcat.publicapi.java.client.model.JsonPatchOperation.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new com.configcat.publicapi.java.client.model.MeModel.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new com.configcat.publicapi.java.client.model.MemberModel.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new com.configcat.publicapi.java.client.model.ModifyIntegrationRequest.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new com.configcat.publicapi.java.client.model.OrganizationAdminModel.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new com.configcat.publicapi.java.client.model.OrganizationInvitationModel.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new com.configcat.publicapi.java.client.model.OrganizationMemberModel.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new com.configcat.publicapi.java.client.model.OrganizationMembersModel.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new com.configcat.publicapi.java.client.model.OrganizationModel.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new com.configcat.publicapi.java.client.model.OrganizationPermissionGroupModel.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new com.configcat.publicapi.java.client.model.OrganizationPermissionModel.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new com.configcat.publicapi.java.client.model.OrganizationProductModel.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new com.configcat.publicapi.java.client.model.PercentageOptionModel.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new com.configcat.publicapi.java.client.model.PermissionGroupModel.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new com.configcat.publicapi.java.client.model.PreferencesModel.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new com.configcat.publicapi.java.client.model.PrerequisiteFlagConditionModel.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new com.configcat.publicapi.java.client.model.ProductModel.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new com.configcat.publicapi.java.client.model.ReasonRequiredEnvironmentModel.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new com.configcat.publicapi.java.client.model.ReferenceLine.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new com.configcat.publicapi.java.client.model.ReferenceLines.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new com.configcat.publicapi.java.client.model.ReplaceSettingModel.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new com.configcat.publicapi.java.client.model.RolloutPercentageItemModel.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new com.configcat.publicapi.java.client.model.RolloutRuleModel.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new com.configcat.publicapi.java.client.model.SdkKeysModel.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new com.configcat.publicapi.java.client.model.SegmentConditionModel.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new com.configcat.publicapi.java.client.model.SegmentListModel.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new com.configcat.publicapi.java.client.model.SegmentModel.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new com.configcat.publicapi.java.client.model.SettingDataModel.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new com.configcat.publicapi.java.client.model.SettingFormulaModel.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new com.configcat.publicapi.java.client.model.SettingModel.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new com.configcat.publicapi.java.client.model.SettingTagModel.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new com.configcat.publicapi.java.client.model.SettingValueModel.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new com.configcat.publicapi.java.client.model.TagModel.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new com.configcat.publicapi.java.client.model.TargetingRuleModel.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new com.configcat.publicapi.java.client.model.UpdateConfigRequest.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new com.configcat.publicapi.java.client.model.UpdateEnvironmentModel.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new com.configcat.publicapi.java.client.model.UpdateEvaluationFormulaModel.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new com.configcat.publicapi.java.client.model.UpdateEvaluationFormulaWithIdModel.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new com.configcat.publicapi.java.client.model.UpdateEvaluationFormulasModel.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new com.configcat.publicapi.java.client.model.UpdateMemberPermissionsRequest.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new com.configcat.publicapi.java.client.model.UpdatePermissionGroupRequest.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new com.configcat.publicapi.java.client.model.UpdatePreferencesRequest.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new com.configcat.publicapi.java.client.model.UpdateProductRequest.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new com.configcat.publicapi.java.client.model.UpdateReasonRequiredEnvironmentModel.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new com.configcat.publicapi.java.client.model.UpdateSegmentModel.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new com.configcat.publicapi.java.client.model.UpdateSettingValueModel.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new com.configcat.publicapi.java.client.model.UpdateSettingValueWithSettingIdModel.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new com.configcat.publicapi.java.client.model.UpdateSettingValuesWithIdModel.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new com.configcat.publicapi.java.client.model.UpdateTagModel.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new com.configcat.publicapi.java.client.model.UserConditionModel.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new com.configcat.publicapi.java.client.model.UserModel.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new com.configcat.publicapi.java.client.model.ValueModel.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new com.configcat.publicapi.java.client.model.WebHookRequest.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new com.configcat.publicapi.java.client.model.WebhookConfig.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new com.configcat.publicapi.java.client.model.WebhookEnvironment.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new com.configcat.publicapi.java.client.model.WebhookHeaderModel.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new com.configcat.publicapi.java.client.model.WebhookModel.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new com.configcat.publicapi.java.client.model.WebhookSigningKeysModel.CustomTypeAdapterFactory());
gson = gsonBuilder.create();
}
@@ -413,8 +226,8 @@ public static String serialize(Object obj) {
/**
* Deserialize the given JSON string to Java object.
*
- * @param Type
- * @param body The JSON string
+ * @param Type
+ * @param body The JSON string
* @param returnType The type to deserialize into
* @return The deserialized Java object
*/
@@ -423,8 +236,7 @@ public static T deserialize(String body, Type returnType) {
try {
if (isLenientOnJson) {
JsonReader jsonReader = new JsonReader(new StringReader(body));
- // see
- // https://google-gson.googlecode.com/svn/trunk/gson/docs/javadocs/com/google/gson/stream/JsonReader.html#setLenient(boolean)
+ // see https://google-gson.googlecode.com/svn/trunk/gson/docs/javadocs/com/google/gson/stream/JsonReader.html#setLenient(boolean)
jsonReader.setLenient(true);
return gson.fromJson(jsonReader, returnType);
} else {
@@ -441,7 +253,9 @@ public static T deserialize(String body, Type returnType) {
}
}
- /** Gson TypeAdapter for Byte Array type */
+ /**
+ * Gson TypeAdapter for Byte Array type
+ */
public static class ByteArrayAdapter extends TypeAdapter {
@Override
@@ -467,7 +281,9 @@ public byte[] read(JsonReader in) throws IOException {
}
}
- /** Gson TypeAdapter for JSR310 OffsetDateTime type */
+ /**
+ * Gson TypeAdapter for JSR310 OffsetDateTime type
+ */
public static class OffsetDateTimeTypeAdapter extends TypeAdapter {
private DateTimeFormatter formatter;
@@ -502,14 +318,16 @@ public OffsetDateTime read(JsonReader in) throws IOException {
default:
String date = in.nextString();
if (date.endsWith("+0000")) {
- date = date.substring(0, date.length() - 5) + "Z";
+ date = date.substring(0, date.length()-5) + "Z";
}
return OffsetDateTime.parse(date, formatter);
}
}
}
- /** Gson TypeAdapter for JSR310 LocalDate type */
+ /**
+ * Gson TypeAdapter for JSR310 LocalDate type
+ */
public static class LocalDateTypeAdapter extends TypeAdapter {
private DateTimeFormatter formatter;
@@ -557,8 +375,9 @@ public static void setLocalDateFormat(DateTimeFormatter dateFormat) {
}
/**
- * Gson TypeAdapter for java.sql.Date type If the dateFormat is null, a simple "yyyy-MM-dd"
- * format will be used (more efficient than SimpleDateFormat).
+ * Gson TypeAdapter for java.sql.Date type
+ * If the dateFormat is null, a simple "yyyy-MM-dd" format will be used
+ * (more efficient than SimpleDateFormat).
*/
public static class SqlDateTypeAdapter extends TypeAdapter {
@@ -601,8 +420,7 @@ public java.sql.Date read(JsonReader in) throws IOException {
if (dateFormat != null) {
return new java.sql.Date(dateFormat.parse(date).getTime());
}
- return new java.sql.Date(
- ISO8601Utils.parse(date, new ParsePosition(0)).getTime());
+ return new java.sql.Date(ISO8601Utils.parse(date, new ParsePosition(0)).getTime());
} catch (ParseException e) {
throw new JsonParseException(e);
}
@@ -611,8 +429,8 @@ public java.sql.Date read(JsonReader in) throws IOException {
}
/**
- * Gson TypeAdapter for java.util.Date type If the dateFormat is null, ISO8601Utils will be
- * used.
+ * Gson TypeAdapter for java.util.Date type
+ * If the dateFormat is null, ISO8601Utils will be used.
*/
public static class DateTypeAdapter extends TypeAdapter {
diff --git a/src/main/java/com/configcat/publicapi/java/client/Pair.java b/src/main/java/com/configcat/publicapi/java/client/Pair.java
index fda1580..8a854a2 100644
--- a/src/main/java/com/configcat/publicapi/java/client/Pair.java
+++ b/src/main/java/com/configcat/publicapi/java/client/Pair.java
@@ -1,6 +1,6 @@
/*
* ConfigCat Public Management API
- * The purpose of this API is to access the ConfigCat platform programmatically. You can **Create**, **Read**, **Update** and **Delete** any entities like **Feature Flags, Configs, Environments** or **Products** within ConfigCat. **Base API URL**: https://api.configcat.com If you prefer the swagger documentation, you can find it here: [Swagger UI](https://api.configcat.com/swagger). The API is based on HTTP REST, uses resource-oriented URLs, status codes and supports JSON format. **Important:** Do not use this API for accessing and evaluating feature flag values. Use the [SDKs](https://configcat.com/docs/sdk-reference/overview) or the [ConfigCat Proxy](https://configcat.com/docs/advanced/proxy/proxy-overview/) instead. # OpenAPI Specification The complete specification is publicly available in the following formats: - [OpenAPI v3](https://api.configcat.com/docs/v1/swagger.json) - [Swagger v2](https://api.configcat.com/docs/v1/swagger.v2.json) You can use it to generate client libraries in various languages with [OpenAPI Generator](https://github.com/OpenAPITools/openapi-generator) or [Swagger Codegen](https://swagger.io/tools/swagger-codegen/) to interact with this API. # Authentication This API uses the [Basic HTTP Authentication Scheme](https://en.wikipedia.org/wiki/Basic_access_authentication). # Throttling and rate limits All the rate limited API calls are returning information about the current rate limit period in the following HTTP headers: | Header | Description | | :- | :- | | X-Rate-Limit-Remaining | The maximum number of requests remaining in the current rate limit period. | | X-Rate-Limit-Reset | The time when the current rate limit period resets. | When the rate limit is exceeded by a request, the API returns with a `HTTP 429 - Too many requests` status along with a `Retry-After` HTTP header.
+ * The purpose of this API is to access the ConfigCat platform programmatically. You can **Create**, **Read**, **Update** and **Delete** any entities like **Feature Flags, Configs, Environments** or **Products** within ConfigCat. **Base API URL**: https://api.configcat.com If you prefer the swagger documentation, you can find it here: [Swagger UI](https://api.configcat.com/swagger). The API is based on HTTP REST, uses resource-oriented URLs, status codes and supports JSON format. **Important:** Do not use this API for accessing and evaluating feature flag values. Use the [SDKs](https://configcat.com/docs/sdk-reference/overview) or the [ConfigCat Proxy](https://configcat.com/docs/advanced/proxy/proxy-overview/) instead. # OpenAPI Specification The complete specification is publicly available in the following formats: - [OpenAPI v3](https://api.configcat.com/docs/v1/swagger.json) - [Swagger v2](https://api.configcat.com/docs/v1/swagger.v2.json) You can use it to generate client libraries in various languages with [OpenAPI Generator](https://github.com/OpenAPITools/openapi-generator) or [Swagger Codegen](https://swagger.io/tools/swagger-codegen/) to interact with this API. # Authentication This API uses the [Basic HTTP Authentication Scheme](https://en.wikipedia.org/wiki/Basic_access_authentication). # Throttling and rate limits All the rate limited API calls are returning information about the current rate limit period in the following HTTP headers: | Header | Description | | :- | :- | | X-Rate-Limit-Remaining | The maximum number of requests remaining in the current rate limit period. | | X-Rate-Limit-Reset | The time when the current rate limit period resets. | When the rate limit is exceeded by a request, the API returns with a `HTTP 429 - Too many requests` status along with a `Retry-After` HTTP header.
*
* The version of the OpenAPI document: v1
* Contact: support@configcat.com
@@ -10,17 +10,15 @@
* Do not edit the class manually.
*/
+
package com.configcat.publicapi.java.client;
-@javax.annotation.Generated(
- value = "org.openapitools.codegen.languages.JavaClientCodegen",
- date = "2024-10-09T12:38:06.739118192Z[Etc/UTC]",
- comments = "Generator version: 7.7.0")
+@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-02-20T16:55:24.304297906Z[Etc/UTC]", comments = "Generator version: 7.7.0")
public class Pair {
private String name = "";
private String value = "";
- public Pair(String name, String value) {
+ public Pair (String name, String value) {
setName(name);
setValue(value);
}
diff --git a/src/main/java/com/configcat/publicapi/java/client/ProgressRequestBody.java b/src/main/java/com/configcat/publicapi/java/client/ProgressRequestBody.java
index 13d182d..fa0316d 100644
--- a/src/main/java/com/configcat/publicapi/java/client/ProgressRequestBody.java
+++ b/src/main/java/com/configcat/publicapi/java/client/ProgressRequestBody.java
@@ -1,6 +1,6 @@
/*
* ConfigCat Public Management API
- * The purpose of this API is to access the ConfigCat platform programmatically. You can **Create**, **Read**, **Update** and **Delete** any entities like **Feature Flags, Configs, Environments** or **Products** within ConfigCat. **Base API URL**: https://api.configcat.com If you prefer the swagger documentation, you can find it here: [Swagger UI](https://api.configcat.com/swagger). The API is based on HTTP REST, uses resource-oriented URLs, status codes and supports JSON format. **Important:** Do not use this API for accessing and evaluating feature flag values. Use the [SDKs](https://configcat.com/docs/sdk-reference/overview) or the [ConfigCat Proxy](https://configcat.com/docs/advanced/proxy/proxy-overview/) instead. # OpenAPI Specification The complete specification is publicly available in the following formats: - [OpenAPI v3](https://api.configcat.com/docs/v1/swagger.json) - [Swagger v2](https://api.configcat.com/docs/v1/swagger.v2.json) You can use it to generate client libraries in various languages with [OpenAPI Generator](https://github.com/OpenAPITools/openapi-generator) or [Swagger Codegen](https://swagger.io/tools/swagger-codegen/) to interact with this API. # Authentication This API uses the [Basic HTTP Authentication Scheme](https://en.wikipedia.org/wiki/Basic_access_authentication). # Throttling and rate limits All the rate limited API calls are returning information about the current rate limit period in the following HTTP headers: | Header | Description | | :- | :- | | X-Rate-Limit-Remaining | The maximum number of requests remaining in the current rate limit period. | | X-Rate-Limit-Reset | The time when the current rate limit period resets. | When the rate limit is exceeded by a request, the API returns with a `HTTP 429 - Too many requests` status along with a `Retry-After` HTTP header.
+ * The purpose of this API is to access the ConfigCat platform programmatically. You can **Create**, **Read**, **Update** and **Delete** any entities like **Feature Flags, Configs, Environments** or **Products** within ConfigCat. **Base API URL**: https://api.configcat.com If you prefer the swagger documentation, you can find it here: [Swagger UI](https://api.configcat.com/swagger). The API is based on HTTP REST, uses resource-oriented URLs, status codes and supports JSON format. **Important:** Do not use this API for accessing and evaluating feature flag values. Use the [SDKs](https://configcat.com/docs/sdk-reference/overview) or the [ConfigCat Proxy](https://configcat.com/docs/advanced/proxy/proxy-overview/) instead. # OpenAPI Specification The complete specification is publicly available in the following formats: - [OpenAPI v3](https://api.configcat.com/docs/v1/swagger.json) - [Swagger v2](https://api.configcat.com/docs/v1/swagger.v2.json) You can use it to generate client libraries in various languages with [OpenAPI Generator](https://github.com/OpenAPITools/openapi-generator) or [Swagger Codegen](https://swagger.io/tools/swagger-codegen/) to interact with this API. # Authentication This API uses the [Basic HTTP Authentication Scheme](https://en.wikipedia.org/wiki/Basic_access_authentication). # Throttling and rate limits All the rate limited API calls are returning information about the current rate limit period in the following HTTP headers: | Header | Description | | :- | :- | | X-Rate-Limit-Remaining | The maximum number of requests remaining in the current rate limit period. | | X-Rate-Limit-Reset | The time when the current rate limit period resets. | When the rate limit is exceeded by a request, the API returns with a `HTTP 429 - Too many requests` status along with a `Retry-After` HTTP header.
*
* The version of the OpenAPI document: v1
* Contact: support@configcat.com
@@ -10,12 +10,14 @@
* Do not edit the class manually.
*/
-package com.configcat.publicapi.java.client;
+package com.configcat.publicapi.java.client;
-import java.io.IOException;
import okhttp3.MediaType;
import okhttp3.RequestBody;
+
+import java.io.IOException;
+
import okio.Buffer;
import okio.BufferedSink;
import okio.ForwardingSink;
@@ -64,8 +66,7 @@ public void write(Buffer source, long byteCount) throws IOException {
}
bytesWritten += byteCount;
- callback.onUploadProgress(
- bytesWritten, contentLength, bytesWritten == contentLength);
+ callback.onUploadProgress(bytesWritten, contentLength, bytesWritten == contentLength);
}
};
}
diff --git a/src/main/java/com/configcat/publicapi/java/client/ProgressResponseBody.java b/src/main/java/com/configcat/publicapi/java/client/ProgressResponseBody.java
index 8a45337..6fb85b3 100644
--- a/src/main/java/com/configcat/publicapi/java/client/ProgressResponseBody.java
+++ b/src/main/java/com/configcat/publicapi/java/client/ProgressResponseBody.java
@@ -1,6 +1,6 @@
/*
* ConfigCat Public Management API
- * The purpose of this API is to access the ConfigCat platform programmatically. You can **Create**, **Read**, **Update** and **Delete** any entities like **Feature Flags, Configs, Environments** or **Products** within ConfigCat. **Base API URL**: https://api.configcat.com If you prefer the swagger documentation, you can find it here: [Swagger UI](https://api.configcat.com/swagger). The API is based on HTTP REST, uses resource-oriented URLs, status codes and supports JSON format. **Important:** Do not use this API for accessing and evaluating feature flag values. Use the [SDKs](https://configcat.com/docs/sdk-reference/overview) or the [ConfigCat Proxy](https://configcat.com/docs/advanced/proxy/proxy-overview/) instead. # OpenAPI Specification The complete specification is publicly available in the following formats: - [OpenAPI v3](https://api.configcat.com/docs/v1/swagger.json) - [Swagger v2](https://api.configcat.com/docs/v1/swagger.v2.json) You can use it to generate client libraries in various languages with [OpenAPI Generator](https://github.com/OpenAPITools/openapi-generator) or [Swagger Codegen](https://swagger.io/tools/swagger-codegen/) to interact with this API. # Authentication This API uses the [Basic HTTP Authentication Scheme](https://en.wikipedia.org/wiki/Basic_access_authentication). # Throttling and rate limits All the rate limited API calls are returning information about the current rate limit period in the following HTTP headers: | Header | Description | | :- | :- | | X-Rate-Limit-Remaining | The maximum number of requests remaining in the current rate limit period. | | X-Rate-Limit-Reset | The time when the current rate limit period resets. | When the rate limit is exceeded by a request, the API returns with a `HTTP 429 - Too many requests` status along with a `Retry-After` HTTP header.
+ * The purpose of this API is to access the ConfigCat platform programmatically. You can **Create**, **Read**, **Update** and **Delete** any entities like **Feature Flags, Configs, Environments** or **Products** within ConfigCat. **Base API URL**: https://api.configcat.com If you prefer the swagger documentation, you can find it here: [Swagger UI](https://api.configcat.com/swagger). The API is based on HTTP REST, uses resource-oriented URLs, status codes and supports JSON format. **Important:** Do not use this API for accessing and evaluating feature flag values. Use the [SDKs](https://configcat.com/docs/sdk-reference/overview) or the [ConfigCat Proxy](https://configcat.com/docs/advanced/proxy/proxy-overview/) instead. # OpenAPI Specification The complete specification is publicly available in the following formats: - [OpenAPI v3](https://api.configcat.com/docs/v1/swagger.json) - [Swagger v2](https://api.configcat.com/docs/v1/swagger.v2.json) You can use it to generate client libraries in various languages with [OpenAPI Generator](https://github.com/OpenAPITools/openapi-generator) or [Swagger Codegen](https://swagger.io/tools/swagger-codegen/) to interact with this API. # Authentication This API uses the [Basic HTTP Authentication Scheme](https://en.wikipedia.org/wiki/Basic_access_authentication). # Throttling and rate limits All the rate limited API calls are returning information about the current rate limit period in the following HTTP headers: | Header | Description | | :- | :- | | X-Rate-Limit-Remaining | The maximum number of requests remaining in the current rate limit period. | | X-Rate-Limit-Reset | The time when the current rate limit period resets. | When the rate limit is exceeded by a request, the API returns with a `HTTP 429 - Too many requests` status along with a `Retry-After` HTTP header.
*
* The version of the OpenAPI document: v1
* Contact: support@configcat.com
@@ -10,12 +10,14 @@
* Do not edit the class manually.
*/
-package com.configcat.publicapi.java.client;
+package com.configcat.publicapi.java.client;
-import java.io.IOException;
import okhttp3.MediaType;
import okhttp3.ResponseBody;
+
+import java.io.IOException;
+
import okio.Buffer;
import okio.BufferedSource;
import okio.ForwardingSource;
@@ -60,8 +62,7 @@ public long read(Buffer sink, long byteCount) throws IOException {
long bytesRead = super.read(sink, byteCount);
// read() returns the number of bytes read, or -1 if this source is exhausted.
totalBytesRead += bytesRead != -1 ? bytesRead : 0;
- callback.onDownloadProgress(
- totalBytesRead, responseBody.contentLength(), bytesRead == -1);
+ callback.onDownloadProgress(totalBytesRead, responseBody.contentLength(), bytesRead == -1);
return bytesRead;
}
};
diff --git a/src/main/java/com/configcat/publicapi/java/client/ServerConfiguration.java b/src/main/java/com/configcat/publicapi/java/client/ServerConfiguration.java
index a039961..935cc91 100644
--- a/src/main/java/com/configcat/publicapi/java/client/ServerConfiguration.java
+++ b/src/main/java/com/configcat/publicapi/java/client/ServerConfiguration.java
@@ -1,13 +1,11 @@
package com.configcat.publicapi.java.client;
-
import java.util.Map;
-/** Representing a Server configuration. */
-@javax.annotation.Generated(
- value = "org.openapitools.codegen.languages.JavaClientCodegen",
- date = "2024-10-09T12:38:06.739118192Z[Etc/UTC]",
- comments = "Generator version: 7.7.0")
+/**
+ * Representing a Server configuration.
+ */
+@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-02-20T16:55:24.304297906Z[Etc/UTC]", comments = "Generator version: 7.7.0")
public class ServerConfiguration {
public String URL;
public String description;
@@ -16,11 +14,9 @@ public class ServerConfiguration {
/**
* @param URL A URL to the target host.
* @param description A description of the host designated by the URL.
- * @param variables A map between a variable name and its value. The value is used for
- * substitution in the server's URL template.
+ * @param variables A map between a variable name and its value. The value is used for substitution in the server's URL template.
*/
- public ServerConfiguration(
- String URL, String description, Map variables) {
+ public ServerConfiguration(String URL, String description, Map variables) {
this.URL = URL;
this.description = description;
this.variables = variables;
@@ -36,21 +32,15 @@ public String URL(Map variables) {
String url = this.URL;
// go through variables and replace placeholders
- for (Map.Entry variable : this.variables.entrySet()) {
+ for (Map.Entry variable: this.variables.entrySet()) {
String name = variable.getKey();
ServerVariable serverVariable = variable.getValue();
String value = serverVariable.defaultValue;
if (variables != null && variables.containsKey(name)) {
value = variables.get(name);
- if (serverVariable.enumValues.size() > 0
- && !serverVariable.enumValues.contains(value)) {
- throw new IllegalArgumentException(
- "The variable "
- + name
- + " in the server URL has invalid value "
- + value
- + ".");
+ if (serverVariable.enumValues.size() > 0 && !serverVariable.enumValues.contains(value)) {
+ throw new IllegalArgumentException("The variable " + name + " in the server URL has invalid value " + value + ".");
}
}
url = url.replace("{" + name + "}", value);
diff --git a/src/main/java/com/configcat/publicapi/java/client/ServerVariable.java b/src/main/java/com/configcat/publicapi/java/client/ServerVariable.java
index a878bf2..642d8ea 100644
--- a/src/main/java/com/configcat/publicapi/java/client/ServerVariable.java
+++ b/src/main/java/com/configcat/publicapi/java/client/ServerVariable.java
@@ -1,13 +1,11 @@
package com.configcat.publicapi.java.client;
-
import java.util.HashSet;
-/** Representing a Server Variable for server URL template substitution. */
-@javax.annotation.Generated(
- value = "org.openapitools.codegen.languages.JavaClientCodegen",
- date = "2024-10-09T12:38:06.739118192Z[Etc/UTC]",
- comments = "Generator version: 7.7.0")
+/**
+ * Representing a Server Variable for server URL template substitution.
+ */
+@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-02-20T16:55:24.304297906Z[Etc/UTC]", comments = "Generator version: 7.7.0")
public class ServerVariable {
public String description;
public String defaultValue;
@@ -16,8 +14,7 @@ public class ServerVariable {
/**
* @param description A description for the server variable.
* @param defaultValue The default value to use for substitution.
- * @param enumValues An enumeration of string values to be used if the substitution options are
- * from a limited set.
+ * @param enumValues An enumeration of string values to be used if the substitution options are from a limited set.
*/
public ServerVariable(String description, String defaultValue, HashSet enumValues) {
this.description = description;
diff --git a/src/main/java/com/configcat/publicapi/java/client/StringUtil.java b/src/main/java/com/configcat/publicapi/java/client/StringUtil.java
index e2e7861..0662de4 100644
--- a/src/main/java/com/configcat/publicapi/java/client/StringUtil.java
+++ b/src/main/java/com/configcat/publicapi/java/client/StringUtil.java
@@ -1,6 +1,6 @@
/*
* ConfigCat Public Management API
- * The purpose of this API is to access the ConfigCat platform programmatically. You can **Create**, **Read**, **Update** and **Delete** any entities like **Feature Flags, Configs, Environments** or **Products** within ConfigCat. **Base API URL**: https://api.configcat.com If you prefer the swagger documentation, you can find it here: [Swagger UI](https://api.configcat.com/swagger). The API is based on HTTP REST, uses resource-oriented URLs, status codes and supports JSON format. **Important:** Do not use this API for accessing and evaluating feature flag values. Use the [SDKs](https://configcat.com/docs/sdk-reference/overview) or the [ConfigCat Proxy](https://configcat.com/docs/advanced/proxy/proxy-overview/) instead. # OpenAPI Specification The complete specification is publicly available in the following formats: - [OpenAPI v3](https://api.configcat.com/docs/v1/swagger.json) - [Swagger v2](https://api.configcat.com/docs/v1/swagger.v2.json) You can use it to generate client libraries in various languages with [OpenAPI Generator](https://github.com/OpenAPITools/openapi-generator) or [Swagger Codegen](https://swagger.io/tools/swagger-codegen/) to interact with this API. # Authentication This API uses the [Basic HTTP Authentication Scheme](https://en.wikipedia.org/wiki/Basic_access_authentication). # Throttling and rate limits All the rate limited API calls are returning information about the current rate limit period in the following HTTP headers: | Header | Description | | :- | :- | | X-Rate-Limit-Remaining | The maximum number of requests remaining in the current rate limit period. | | X-Rate-Limit-Reset | The time when the current rate limit period resets. | When the rate limit is exceeded by a request, the API returns with a `HTTP 429 - Too many requests` status along with a `Retry-After` HTTP header.
+ * The purpose of this API is to access the ConfigCat platform programmatically. You can **Create**, **Read**, **Update** and **Delete** any entities like **Feature Flags, Configs, Environments** or **Products** within ConfigCat. **Base API URL**: https://api.configcat.com If you prefer the swagger documentation, you can find it here: [Swagger UI](https://api.configcat.com/swagger). The API is based on HTTP REST, uses resource-oriented URLs, status codes and supports JSON format. **Important:** Do not use this API for accessing and evaluating feature flag values. Use the [SDKs](https://configcat.com/docs/sdk-reference/overview) or the [ConfigCat Proxy](https://configcat.com/docs/advanced/proxy/proxy-overview/) instead. # OpenAPI Specification The complete specification is publicly available in the following formats: - [OpenAPI v3](https://api.configcat.com/docs/v1/swagger.json) - [Swagger v2](https://api.configcat.com/docs/v1/swagger.v2.json) You can use it to generate client libraries in various languages with [OpenAPI Generator](https://github.com/OpenAPITools/openapi-generator) or [Swagger Codegen](https://swagger.io/tools/swagger-codegen/) to interact with this API. # Authentication This API uses the [Basic HTTP Authentication Scheme](https://en.wikipedia.org/wiki/Basic_access_authentication). # Throttling and rate limits All the rate limited API calls are returning information about the current rate limit period in the following HTTP headers: | Header | Description | | :- | :- | | X-Rate-Limit-Remaining | The maximum number of requests remaining in the current rate limit period. | | X-Rate-Limit-Reset | The time when the current rate limit period resets. | When the rate limit is exceeded by a request, the API returns with a `HTTP 429 - Too many requests` status along with a `Retry-After` HTTP header.
*
* The version of the OpenAPI document: v1
* Contact: support@configcat.com
@@ -10,76 +10,74 @@
* Do not edit the class manually.
*/
-package com.configcat.publicapi.java.client;
+package com.configcat.publicapi.java.client;
import java.util.Collection;
import java.util.Iterator;
-@javax.annotation.Generated(
- value = "org.openapitools.codegen.languages.JavaClientCodegen",
- date = "2024-10-09T12:38:06.739118192Z[Etc/UTC]",
- comments = "Generator version: 7.7.0")
+@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-02-20T16:55:24.304297906Z[Etc/UTC]", comments = "Generator version: 7.7.0")
public class StringUtil {
- /**
- * Check if the given array contains the given value (with case-insensitive comparison).
- *
- * @param array The array
- * @param value The value to search
- * @return true if the array contains the value
- */
- public static boolean containsIgnoreCase(String[] array, String value) {
- for (String str : array) {
- if (value == null && str == null) {
- return true;
- }
- if (value != null && value.equalsIgnoreCase(str)) {
- return true;
- }
- }
- return false;
+ /**
+ * Check if the given array contains the given value (with case-insensitive comparison).
+ *
+ * @param array The array
+ * @param value The value to search
+ * @return true if the array contains the value
+ */
+ public static boolean containsIgnoreCase(String[] array, String value) {
+ for (String str : array) {
+ if (value == null && str == null) {
+ return true;
+ }
+ if (value != null && value.equalsIgnoreCase(str)) {
+ return true;
+ }
}
+ return false;
+ }
- /**
- * Join an array of strings with the given separator.
- *
- * Note: This might be replaced by utility method from commons-lang or guava someday if one
- * of those libraries is added as dependency.
- *
- * @param array The array of strings
- * @param separator The separator
- * @return the resulting string
- */
- public static String join(String[] array, String separator) {
- int len = array.length;
- if (len == 0) {
- return "";
- }
+ /**
+ * Join an array of strings with the given separator.
+ *
+ * Note: This might be replaced by utility method from commons-lang or guava someday
+ * if one of those libraries is added as dependency.
+ *
+ *
+ * @param array The array of strings
+ * @param separator The separator
+ * @return the resulting string
+ */
+ public static String join(String[] array, String separator) {
+ int len = array.length;
+ if (len == 0) {
+ return "";
+ }
- StringBuilder out = new StringBuilder();
- out.append(array[0]);
- for (int i = 1; i < len; i++) {
- out.append(separator).append(array[i]);
- }
- return out.toString();
+ StringBuilder out = new StringBuilder();
+ out.append(array[0]);
+ for (int i = 1; i < len; i++) {
+ out.append(separator).append(array[i]);
}
+ return out.toString();
+ }
- /**
- * Join a list of strings with the given separator.
- *
- * @param list The list of strings
- * @param separator The separator
- * @return the resulting string
- */
- public static String join(Collection list, String separator) {
- Iterator iterator = list.iterator();
- StringBuilder out = new StringBuilder();
- if (iterator.hasNext()) {
- out.append(iterator.next());
- }
- while (iterator.hasNext()) {
- out.append(separator).append(iterator.next());
- }
- return out.toString();
+ /**
+ * Join a list of strings with the given separator.
+ *
+ * @param list The list of strings
+ * @param separator The separator
+ * @return the resulting string
+ */
+ public static String join(Collection list, String separator) {
+ Iterator iterator = list.iterator();
+ StringBuilder out = new StringBuilder();
+ if (iterator.hasNext()) {
+ out.append(iterator.next());
+ }
+ while (iterator.hasNext()) {
+ out.append(separator).append(iterator.next());
}
+ return out.toString();
+ }
}
diff --git a/src/main/java/com/configcat/publicapi/java/client/api/AuditLogsApi.java b/src/main/java/com/configcat/publicapi/java/client/api/AuditLogsApi.java
index 8cfb707..2d303c9 100644
--- a/src/main/java/com/configcat/publicapi/java/client/api/AuditLogsApi.java
+++ b/src/main/java/com/configcat/publicapi/java/client/api/AuditLogsApi.java
@@ -1,6 +1,6 @@
/*
* ConfigCat Public Management API
- * The purpose of this API is to access the ConfigCat platform programmatically. You can **Create**, **Read**, **Update** and **Delete** any entities like **Feature Flags, Configs, Environments** or **Products** within ConfigCat. **Base API URL**: https://api.configcat.com If you prefer the swagger documentation, you can find it here: [Swagger UI](https://api.configcat.com/swagger). The API is based on HTTP REST, uses resource-oriented URLs, status codes and supports JSON format. **Important:** Do not use this API for accessing and evaluating feature flag values. Use the [SDKs](https://configcat.com/docs/sdk-reference/overview) or the [ConfigCat Proxy](https://configcat.com/docs/advanced/proxy/proxy-overview/) instead. # OpenAPI Specification The complete specification is publicly available in the following formats: - [OpenAPI v3](https://api.configcat.com/docs/v1/swagger.json) - [Swagger v2](https://api.configcat.com/docs/v1/swagger.v2.json) You can use it to generate client libraries in various languages with [OpenAPI Generator](https://github.com/OpenAPITools/openapi-generator) or [Swagger Codegen](https://swagger.io/tools/swagger-codegen/) to interact with this API. # Authentication This API uses the [Basic HTTP Authentication Scheme](https://en.wikipedia.org/wiki/Basic_access_authentication). # Throttling and rate limits All the rate limited API calls are returning information about the current rate limit period in the following HTTP headers: | Header | Description | | :- | :- | | X-Rate-Limit-Remaining | The maximum number of requests remaining in the current rate limit period. | | X-Rate-Limit-Reset | The time when the current rate limit period resets. | When the rate limit is exceeded by a request, the API returns with a `HTTP 429 - Too many requests` status along with a `Retry-After` HTTP header.
+ * The purpose of this API is to access the ConfigCat platform programmatically. You can **Create**, **Read**, **Update** and **Delete** any entities like **Feature Flags, Configs, Environments** or **Products** within ConfigCat. **Base API URL**: https://api.configcat.com If you prefer the swagger documentation, you can find it here: [Swagger UI](https://api.configcat.com/swagger). The API is based on HTTP REST, uses resource-oriented URLs, status codes and supports JSON format. **Important:** Do not use this API for accessing and evaluating feature flag values. Use the [SDKs](https://configcat.com/docs/sdk-reference/overview) or the [ConfigCat Proxy](https://configcat.com/docs/advanced/proxy/proxy-overview/) instead. # OpenAPI Specification The complete specification is publicly available in the following formats: - [OpenAPI v3](https://api.configcat.com/docs/v1/swagger.json) - [Swagger v2](https://api.configcat.com/docs/v1/swagger.v2.json) You can use it to generate client libraries in various languages with [OpenAPI Generator](https://github.com/OpenAPITools/openapi-generator) or [Swagger Codegen](https://swagger.io/tools/swagger-codegen/) to interact with this API. # Authentication This API uses the [Basic HTTP Authentication Scheme](https://en.wikipedia.org/wiki/Basic_access_authentication). # Throttling and rate limits All the rate limited API calls are returning information about the current rate limit period in the following HTTP headers: | Header | Description | | :- | :- | | X-Rate-Limit-Remaining | The maximum number of requests remaining in the current rate limit period. | | X-Rate-Limit-Reset | The time when the current rate limit period resets. | When the rate limit is exceeded by a request, the API returns with a `HTTP 429 - Too many requests` status along with a `Retry-After` HTTP header.
*
* The version of the OpenAPI document: v1
* Contact: support@configcat.com
@@ -10,8 +10,8 @@
* Do not edit the class manually.
*/
-package com.configcat.publicapi.java.client.api;
+package com.configcat.publicapi.java.client.api;
import com.configcat.publicapi.java.client.ApiCallback;
import com.configcat.publicapi.java.client.ApiClient;
@@ -19,17 +19,25 @@
import com.configcat.publicapi.java.client.ApiResponse;
import com.configcat.publicapi.java.client.Configuration;
import com.configcat.publicapi.java.client.Pair;
+import com.configcat.publicapi.java.client.ProgressRequestBody;
+import com.configcat.publicapi.java.client.ProgressResponseBody;
+
+import com.google.gson.reflect.TypeToken;
+
+import java.io.IOException;
+
+
import com.configcat.publicapi.java.client.model.AuditLogItemModel;
import com.configcat.publicapi.java.client.model.AuditLogType;
+import java.time.OffsetDateTime;
import com.configcat.publicapi.java.client.model.SettingModel;
-import com.google.gson.reflect.TypeToken;
+import java.util.UUID;
+
import java.lang.reflect.Type;
-import java.time.OffsetDateTime;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
-import java.util.UUID;
public class AuditLogsApi {
private ApiClient localVarApiClient;
@@ -70,7 +78,6 @@ public void setCustomBaseUrl(String customBaseUrl) {
/**
* Build call for getAuditlogs
- *
* @param productId The identifier of the Product. (required)
* @param configId The identifier of the Config. (optional)
* @param environmentId The identifier of the Environment. (optional)
@@ -81,31 +88,23 @@ public void setCustomBaseUrl(String customBaseUrl) {
* @return Call to execute
* @throws ApiException If fail to serialize the request body object
* @http.response.details
- *
- * | Status Code | Description | Response Headers |
- * | 200 | | - |
- * | 400 | Bad request. | - |
- * | 404 | Not found. | - |
- * | 429 | Too many requests. In case of the request rate exceeds the rate limits. | - |
- *
+
+ | Status Code | Description | Response Headers |
+ | 200 | | - |
+ | 400 | Bad request. | - |
+ | 404 | Not found. | - |
+ | 429 | Too many requests. In case of the request rate exceeds the rate limits. | - |
+
*/
- public okhttp3.Call getAuditlogsCall(
- UUID productId,
- UUID configId,
- UUID environmentId,
- AuditLogType auditLogType,
- OffsetDateTime fromUtcDateTime,
- OffsetDateTime toUtcDateTime,
- final ApiCallback _callback)
- throws ApiException {
+ public okhttp3.Call getAuditlogsCall(UUID productId, UUID configId, UUID environmentId, AuditLogType auditLogType, OffsetDateTime fromUtcDateTime, OffsetDateTime toUtcDateTime, final ApiCallback _callback) throws ApiException {
String basePath = null;
// Operation Servers
- String[] localBasePaths = new String[] {};
+ String[] localBasePaths = new String[] { };
// Determine Base Path to Use
- if (localCustomBaseUrl != null) {
+ if (localCustomBaseUrl != null){
basePath = localCustomBaseUrl;
- } else if (localBasePaths.length > 0) {
+ } else if ( localBasePaths.length > 0 ) {
basePath = localBasePaths[localHostIndex];
} else {
basePath = null;
@@ -114,11 +113,8 @@ public okhttp3.Call getAuditlogsCall(
Object localVarPostBody = null;
// create path and map variables
- String localVarPath =
- "/v1/products/{productId}/auditlogs"
- .replace(
- "{" + "productId" + "}",
- localVarApiClient.escapeString(productId.toString()));
+ String localVarPath = "/v1/products/{productId}/auditlogs"
+ .replace("{" + "productId" + "}", localVarApiClient.escapeString(productId.toString()));
List localVarQueryParams = new ArrayList();
List localVarCollectionQueryParams = new ArrayList();
@@ -131,83 +127,54 @@ public okhttp3.Call getAuditlogsCall(
}
if (environmentId != null) {
- localVarQueryParams.addAll(
- localVarApiClient.parameterToPair("environmentId", environmentId));
+ localVarQueryParams.addAll(localVarApiClient.parameterToPair("environmentId", environmentId));
}
if (auditLogType != null) {
- localVarQueryParams.addAll(
- localVarApiClient.parameterToPair("auditLogType", auditLogType));
+ localVarQueryParams.addAll(localVarApiClient.parameterToPair("auditLogType", auditLogType));
}
if (fromUtcDateTime != null) {
- localVarQueryParams.addAll(
- localVarApiClient.parameterToPair("fromUtcDateTime", fromUtcDateTime));
+ localVarQueryParams.addAll(localVarApiClient.parameterToPair("fromUtcDateTime", fromUtcDateTime));
}
if (toUtcDateTime != null) {
- localVarQueryParams.addAll(
- localVarApiClient.parameterToPair("toUtcDateTime", toUtcDateTime));
+ localVarQueryParams.addAll(localVarApiClient.parameterToPair("toUtcDateTime", toUtcDateTime));
}
- final String[] localVarAccepts = {"application/json"};
+ final String[] localVarAccepts = {
+ "application/json"
+ };
final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
if (localVarAccept != null) {
localVarHeaderParams.put("Accept", localVarAccept);
}
- final String[] localVarContentTypes = {};
- final String localVarContentType =
- localVarApiClient.selectHeaderContentType(localVarContentTypes);
+ final String[] localVarContentTypes = {
+ };
+ final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
if (localVarContentType != null) {
localVarHeaderParams.put("Content-Type", localVarContentType);
}
- String[] localVarAuthNames = new String[] {"Basic"};
- return localVarApiClient.buildCall(
- basePath,
- localVarPath,
- "GET",
- localVarQueryParams,
- localVarCollectionQueryParams,
- localVarPostBody,
- localVarHeaderParams,
- localVarCookieParams,
- localVarFormParams,
- localVarAuthNames,
- _callback);
+ String[] localVarAuthNames = new String[] { "Basic" };
+ return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
}
@SuppressWarnings("rawtypes")
- private okhttp3.Call getAuditlogsValidateBeforeCall(
- UUID productId,
- UUID configId,
- UUID environmentId,
- AuditLogType auditLogType,
- OffsetDateTime fromUtcDateTime,
- OffsetDateTime toUtcDateTime,
- final ApiCallback _callback)
- throws ApiException {
+ private okhttp3.Call getAuditlogsValidateBeforeCall(UUID productId, UUID configId, UUID environmentId, AuditLogType auditLogType, OffsetDateTime fromUtcDateTime, OffsetDateTime toUtcDateTime, final ApiCallback _callback) throws ApiException {
// verify the required parameter 'productId' is set
if (productId == null) {
- throw new ApiException(
- "Missing the required parameter 'productId' when calling getAuditlogs(Async)");
+ throw new ApiException("Missing the required parameter 'productId' when calling getAuditlogs(Async)");
}
- return getAuditlogsCall(
- productId,
- configId,
- environmentId,
- auditLogType,
- fromUtcDateTime,
- toUtcDateTime,
- _callback);
+ return getAuditlogsCall(productId, configId, environmentId, auditLogType, fromUtcDateTime, toUtcDateTime, _callback);
+
}
/**
- * List Audit log items for Product This endpoint returns the list of Audit log items for a
- * given Product and the result can be optionally filtered by Config and/or Environment.
- *
+ * List Audit log items for Product
+ * This endpoint returns the list of Audit log items for a given Product and the result can be optionally filtered by Config and/or Environment.
* @param productId The identifier of the Product. (required)
* @param configId The identifier of the Config. (optional)
* @param environmentId The identifier of the Environment. (optional)
@@ -215,40 +182,24 @@ private okhttp3.Call getAuditlogsValidateBeforeCall(
* @param fromUtcDateTime Filter Audit logs by starting UTC date. (optional)
* @param toUtcDateTime Filter Audit logs by ending UTC date. (optional)
* @return List<AuditLogItemModel>
- * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the
- * response body
+ * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @http.response.details
- *
- * | Status Code | Description | Response Headers |
- * | 200 | | - |
- * | 400 | Bad request. | - |
- * | 404 | Not found. | - |
- * | 429 | Too many requests. In case of the request rate exceeds the rate limits. | - |
- *
+
+ | Status Code | Description | Response Headers |
+ | 200 | | - |
+ | 400 | Bad request. | - |
+ | 404 | Not found. | - |
+ | 429 | Too many requests. In case of the request rate exceeds the rate limits. | - |
+
*/
- public List getAuditlogs(
- UUID productId,
- UUID configId,
- UUID environmentId,
- AuditLogType auditLogType,
- OffsetDateTime fromUtcDateTime,
- OffsetDateTime toUtcDateTime)
- throws ApiException {
- ApiResponse> localVarResp =
- getAuditlogsWithHttpInfo(
- productId,
- configId,
- environmentId,
- auditLogType,
- fromUtcDateTime,
- toUtcDateTime);
+ public List getAuditlogs(UUID productId, UUID configId, UUID environmentId, AuditLogType auditLogType, OffsetDateTime fromUtcDateTime, OffsetDateTime toUtcDateTime) throws ApiException {
+ ApiResponse> localVarResp = getAuditlogsWithHttpInfo(productId, configId, environmentId, auditLogType, fromUtcDateTime, toUtcDateTime);
return localVarResp.getData();
}
/**
- * List Audit log items for Product This endpoint returns the list of Audit log items for a
- * given Product and the result can be optionally filtered by Config and/or Environment.
- *
+ * List Audit log items for Product
+ * This endpoint returns the list of Audit log items for a given Product and the result can be optionally filtered by Config and/or Environment.
* @param productId The identifier of the Product. (required)
* @param configId The identifier of the Config. (optional)
* @param environmentId The identifier of the Environment. (optional)
@@ -256,43 +207,25 @@ public List getAuditlogs(
* @param fromUtcDateTime Filter Audit logs by starting UTC date. (optional)
* @param toUtcDateTime Filter Audit logs by ending UTC date. (optional)
* @return ApiResponse<List<AuditLogItemModel>>
- * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the
- * response body
+ * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @http.response.details
- *
- * | Status Code | Description | Response Headers |
- * | 200 | | - |
- * | 400 | Bad request. | - |
- * | 404 | Not found. | - |
- * | 429 | Too many requests. In case of the request rate exceeds the rate limits. | - |
- *
+
+ | Status Code | Description | Response Headers |
+ | 200 | | - |
+ | 400 | Bad request. | - |
+ | 404 | Not found. | - |
+ | 429 | Too many requests. In case of the request rate exceeds the rate limits. | - |
+
*/
- public ApiResponse> getAuditlogsWithHttpInfo(
- UUID productId,
- UUID configId,
- UUID environmentId,
- AuditLogType auditLogType,
- OffsetDateTime fromUtcDateTime,
- OffsetDateTime toUtcDateTime)
- throws ApiException {
- okhttp3.Call localVarCall =
- getAuditlogsValidateBeforeCall(
- productId,
- configId,
- environmentId,
- auditLogType,
- fromUtcDateTime,
- toUtcDateTime,
- null);
- Type localVarReturnType = new TypeToken>() {}.getType();
+ public ApiResponse> getAuditlogsWithHttpInfo(UUID productId, UUID configId, UUID environmentId, AuditLogType auditLogType, OffsetDateTime fromUtcDateTime, OffsetDateTime toUtcDateTime) throws ApiException {
+ okhttp3.Call localVarCall = getAuditlogsValidateBeforeCall(productId, configId, environmentId, auditLogType, fromUtcDateTime, toUtcDateTime, null);
+ Type localVarReturnType = new TypeToken>(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
}
/**
- * List Audit log items for Product (asynchronously) This endpoint returns the list of Audit log
- * items for a given Product and the result can be optionally filtered by Config and/or
- * Environment.
- *
+ * List Audit log items for Product (asynchronously)
+ * This endpoint returns the list of Audit log items for a given Product and the result can be optionally filtered by Config and/or Environment.
* @param productId The identifier of the Product. (required)
* @param configId The identifier of the Config. (optional)
* @param environmentId The identifier of the Environment. (optional)
@@ -301,66 +234,47 @@ public ApiResponse> getAuditlogsWithHttpInfo(
* @param toUtcDateTime Filter Audit logs by ending UTC date. (optional)
* @param _callback The callback to be executed when the API call finishes
* @return The request call
- * @throws ApiException If fail to process the API call, e.g. serializing the request body
- * object
+ * @throws ApiException If fail to process the API call, e.g. serializing the request body object
* @http.response.details
- *
- * | Status Code | Description | Response Headers |
- * | 200 | | - |
- * | 400 | Bad request. | - |
- * | 404 | Not found. | - |
- * | 429 | Too many requests. In case of the request rate exceeds the rate limits. | - |
- *
+
+ | Status Code | Description | Response Headers |
+ | 200 | | - |
+ | 400 | Bad request. | - |
+ | 404 | Not found. | - |
+ | 429 | Too many requests. In case of the request rate exceeds the rate limits. | - |
+
*/
- public okhttp3.Call getAuditlogsAsync(
- UUID productId,
- UUID configId,
- UUID environmentId,
- AuditLogType auditLogType,
- OffsetDateTime fromUtcDateTime,
- OffsetDateTime toUtcDateTime,
- final ApiCallback> _callback)
- throws ApiException {
-
- okhttp3.Call localVarCall =
- getAuditlogsValidateBeforeCall(
- productId,
- configId,
- environmentId,
- auditLogType,
- fromUtcDateTime,
- toUtcDateTime,
- _callback);
- Type localVarReturnType = new TypeToken>() {}.getType();
+ public okhttp3.Call getAuditlogsAsync(UUID productId, UUID configId, UUID environmentId, AuditLogType auditLogType, OffsetDateTime fromUtcDateTime, OffsetDateTime toUtcDateTime, final ApiCallback> _callback) throws ApiException {
+
+ okhttp3.Call localVarCall = getAuditlogsValidateBeforeCall(productId, configId, environmentId, auditLogType, fromUtcDateTime, toUtcDateTime, _callback);
+ Type localVarReturnType = new TypeToken>(){}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
/**
* Build call for getDeletedSettings
- *
* @param configId The identifier of the Config. (required)
* @param _callback Callback for upload/download progress
* @return Call to execute
* @throws ApiException If fail to serialize the request body object
* @http.response.details
- *
- * | Status Code | Description | Response Headers |
- * | 200 | | - |
- * | 400 | Bad request. | - |
- * | 404 | Not found. | - |
- * | 429 | Too many requests. In case of the request rate exceeds the rate limits. | - |
- *
+
+ | Status Code | Description | Response Headers |
+ | 200 | | - |
+ | 400 | Bad request. | - |
+ | 404 | Not found. | - |
+ | 429 | Too many requests. In case of the request rate exceeds the rate limits. | - |
+
*/
- public okhttp3.Call getDeletedSettingsCall(UUID configId, final ApiCallback _callback)
- throws ApiException {
+ public okhttp3.Call getDeletedSettingsCall(UUID configId, final ApiCallback _callback) throws ApiException {
String basePath = null;
// Operation Servers
- String[] localBasePaths = new String[] {};
+ String[] localBasePaths = new String[] { };
// Determine Base Path to Use
- if (localCustomBaseUrl != null) {
+ if (localCustomBaseUrl != null){
basePath = localCustomBaseUrl;
- } else if (localBasePaths.length > 0) {
+ } else if ( localBasePaths.length > 0 ) {
basePath = localBasePaths[localHostIndex];
} else {
basePath = null;
@@ -369,11 +283,8 @@ public okhttp3.Call getDeletedSettingsCall(UUID configId, final ApiCallback _cal
Object localVarPostBody = null;
// create path and map variables
- String localVarPath =
- "/v1/configs/{configId}/deleted-settings"
- .replace(
- "{" + "configId" + "}",
- localVarApiClient.escapeString(configId.toString()));
+ String localVarPath = "/v1/configs/{configId}/deleted-settings"
+ .replace("{" + "configId" + "}", localVarApiClient.escapeString(configId.toString()));
List localVarQueryParams = new ArrayList();
List localVarCollectionQueryParams = new ArrayList();
@@ -381,63 +292,50 @@ public okhttp3.Call getDeletedSettingsCall(UUID configId, final ApiCallback _cal
Map localVarCookieParams = new HashMap();
Map localVarFormParams = new HashMap();
- final String[] localVarAccepts = {"application/json"};
+ final String[] localVarAccepts = {
+ "application/json"
+ };
final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
if (localVarAccept != null) {
localVarHeaderParams.put("Accept", localVarAccept);
}
- final String[] localVarContentTypes = {};
- final String localVarContentType =
- localVarApiClient.selectHeaderContentType(localVarContentTypes);
+ final String[] localVarContentTypes = {
+ };
+ final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
if (localVarContentType != null) {
localVarHeaderParams.put("Content-Type", localVarContentType);
}
- String[] localVarAuthNames = new String[] {"Basic"};
- return localVarApiClient.buildCall(
- basePath,
- localVarPath,
- "GET",
- localVarQueryParams,
- localVarCollectionQueryParams,
- localVarPostBody,
- localVarHeaderParams,
- localVarCookieParams,
- localVarFormParams,
- localVarAuthNames,
- _callback);
+ String[] localVarAuthNames = new String[] { "Basic" };
+ return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
}
@SuppressWarnings("rawtypes")
- private okhttp3.Call getDeletedSettingsValidateBeforeCall(
- UUID configId, final ApiCallback _callback) throws ApiException {
+ private okhttp3.Call getDeletedSettingsValidateBeforeCall(UUID configId, final ApiCallback _callback) throws ApiException {
// verify the required parameter 'configId' is set
if (configId == null) {
- throw new ApiException(
- "Missing the required parameter 'configId' when calling"
- + " getDeletedSettings(Async)");
+ throw new ApiException("Missing the required parameter 'configId' when calling getDeletedSettings(Async)");
}
return getDeletedSettingsCall(configId, _callback);
+
}
/**
- * List Deleted Settings This endpoint returns the list of Feature Flags and Settings that were
- * deleted from the given Config.
- *
+ * List Deleted Settings
+ * This endpoint returns the list of Feature Flags and Settings that were deleted from the given Config.
* @param configId The identifier of the Config. (required)
* @return List<SettingModel>
- * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the
- * response body
+ * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @http.response.details
- *
- * | Status Code | Description | Response Headers |
- * | 200 | | - |
- * | 400 | Bad request. | - |
- * | 404 | Not found. | - |
- * | 429 | Too many requests. In case of the request rate exceeds the rate limits. | - |
- *
+
+ | Status Code | Description | Response Headers |
+ | 200 | | - |
+ | 400 | Bad request. | - |
+ | 404 | Not found. | - |
+ | 429 | Too many requests. In case of the request rate exceeds the rate limits. | - |
+
*/
public List getDeletedSettings(UUID configId) throws ApiException {
ApiResponse> localVarResp = getDeletedSettingsWithHttpInfo(configId);
@@ -445,58 +343,51 @@ public List getDeletedSettings(UUID configId) throws ApiException
}
/**
- * List Deleted Settings This endpoint returns the list of Feature Flags and Settings that were
- * deleted from the given Config.
- *
+ * List Deleted Settings
+ * This endpoint returns the list of Feature Flags and Settings that were deleted from the given Config.
* @param configId The identifier of the Config. (required)
* @return ApiResponse<List<SettingModel>>
- * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the
- * response body
+ * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @http.response.details
- *
- * | Status Code | Description | Response Headers |
- * | 200 | | - |
- * | 400 | Bad request. | - |
- * | 404 | Not found. | - |
- * | 429 | Too many requests. In case of the request rate exceeds the rate limits. | - |
- *
+
+ | Status Code | Description | Response Headers |
+ | 200 | | - |
+ | 400 | Bad request. | - |
+ | 404 | Not found. | - |
+ | 429 | Too many requests. In case of the request rate exceeds the rate limits. | - |
+
*/
- public ApiResponse> getDeletedSettingsWithHttpInfo(UUID configId)
- throws ApiException {
+ public ApiResponse> getDeletedSettingsWithHttpInfo(UUID configId) throws ApiException {
okhttp3.Call localVarCall = getDeletedSettingsValidateBeforeCall(configId, null);
- Type localVarReturnType = new TypeToken>() {}.getType();
+ Type localVarReturnType = new TypeToken>(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
}
/**
- * List Deleted Settings (asynchronously) This endpoint returns the list of Feature Flags and
- * Settings that were deleted from the given Config.
- *
+ * List Deleted Settings (asynchronously)
+ * This endpoint returns the list of Feature Flags and Settings that were deleted from the given Config.
* @param configId The identifier of the Config. (required)
* @param _callback The callback to be executed when the API call finishes
* @return The request call
- * @throws ApiException If fail to process the API call, e.g. serializing the request body
- * object
+ * @throws ApiException If fail to process the API call, e.g. serializing the request body object
* @http.response.details
- *
- * | Status Code | Description | Response Headers |
- * | 200 | | - |
- * | 400 | Bad request. | - |
- * | 404 | Not found. | - |
- * | 429 | Too many requests. In case of the request rate exceeds the rate limits. | - |
- *
+
+ | Status Code | Description | Response Headers |
+ | 200 | | - |
+ | 400 | Bad request. | - |
+ | 404 | Not found. | - |
+ | 429 | Too many requests. In case of the request rate exceeds the rate limits. | - |
+
*/
- public okhttp3.Call getDeletedSettingsAsync(
- UUID configId, final ApiCallback> _callback) throws ApiException {
+ public okhttp3.Call getDeletedSettingsAsync(UUID configId, final ApiCallback> _callback) throws ApiException {
okhttp3.Call localVarCall = getDeletedSettingsValidateBeforeCall(configId, _callback);
- Type localVarReturnType = new TypeToken>() {}.getType();
+ Type localVarReturnType = new TypeToken>(){}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
/**
* Build call for getOrganizationAuditlogs
- *
* @param organizationId The identifier of the Organization. (required)
* @param productId The identifier of the Product. (optional)
* @param configId The identifier of the Config. (optional)
@@ -508,32 +399,23 @@ public okhttp3.Call getDeletedSettingsAsync(
* @return Call to execute
* @throws ApiException If fail to serialize the request body object
* @http.response.details
- *
- * | Status Code | Description | Response Headers |
- * | 200 | | - |
- * | 400 | Bad request. | - |
- * | 404 | Not found. | - |
- * | 429 | Too many requests. In case of the request rate exceeds the rate limits. | - |
- *
+
+ | Status Code | Description | Response Headers |
+ | 200 | | - |
+ | 400 | Bad request. | - |
+ | 404 | Not found. | - |
+ | 429 | Too many requests. In case of the request rate exceeds the rate limits. | - |
+
*/
- public okhttp3.Call getOrganizationAuditlogsCall(
- UUID organizationId,
- UUID productId,
- UUID configId,
- UUID environmentId,
- AuditLogType auditLogType,
- OffsetDateTime fromUtcDateTime,
- OffsetDateTime toUtcDateTime,
- final ApiCallback _callback)
- throws ApiException {
+ public okhttp3.Call getOrganizationAuditlogsCall(UUID organizationId, UUID productId, UUID configId, UUID environmentId, AuditLogType auditLogType, OffsetDateTime fromUtcDateTime, OffsetDateTime toUtcDateTime, final ApiCallback _callback) throws ApiException {
String basePath = null;
// Operation Servers
- String[] localBasePaths = new String[] {};
+ String[] localBasePaths = new String[] { };
// Determine Base Path to Use
- if (localCustomBaseUrl != null) {
+ if (localCustomBaseUrl != null){
basePath = localCustomBaseUrl;
- } else if (localBasePaths.length > 0) {
+ } else if ( localBasePaths.length > 0 ) {
basePath = localBasePaths[localHostIndex];
} else {
basePath = null;
@@ -542,11 +424,8 @@ public okhttp3.Call getOrganizationAuditlogsCall(
Object localVarPostBody = null;
// create path and map variables
- String localVarPath =
- "/v1/organizations/{organizationId}/auditlogs"
- .replace(
- "{" + "organizationId" + "}",
- localVarApiClient.escapeString(organizationId.toString()));
+ String localVarPath = "/v1/organizations/{organizationId}/auditlogs"
+ .replace("{" + "organizationId" + "}", localVarApiClient.escapeString(organizationId.toString()));
List localVarQueryParams = new ArrayList();
List localVarCollectionQueryParams = new ArrayList();
@@ -563,87 +442,54 @@ public okhttp3.Call getOrganizationAuditlogsCall(
}
if (environmentId != null) {
- localVarQueryParams.addAll(
- localVarApiClient.parameterToPair("environmentId", environmentId));
+ localVarQueryParams.addAll(localVarApiClient.parameterToPair("environmentId", environmentId));
}
if (auditLogType != null) {
- localVarQueryParams.addAll(
- localVarApiClient.parameterToPair("auditLogType", auditLogType));
+ localVarQueryParams.addAll(localVarApiClient.parameterToPair("auditLogType", auditLogType));
}
if (fromUtcDateTime != null) {
- localVarQueryParams.addAll(
- localVarApiClient.parameterToPair("fromUtcDateTime", fromUtcDateTime));
+ localVarQueryParams.addAll(localVarApiClient.parameterToPair("fromUtcDateTime", fromUtcDateTime));
}
if (toUtcDateTime != null) {
- localVarQueryParams.addAll(
- localVarApiClient.parameterToPair("toUtcDateTime", toUtcDateTime));
+ localVarQueryParams.addAll(localVarApiClient.parameterToPair("toUtcDateTime", toUtcDateTime));
}
- final String[] localVarAccepts = {"application/json"};
+ final String[] localVarAccepts = {
+ "application/json"
+ };
final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
if (localVarAccept != null) {
localVarHeaderParams.put("Accept", localVarAccept);
}
- final String[] localVarContentTypes = {};
- final String localVarContentType =
- localVarApiClient.selectHeaderContentType(localVarContentTypes);
+ final String[] localVarContentTypes = {
+ };
+ final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
if (localVarContentType != null) {
localVarHeaderParams.put("Content-Type", localVarContentType);
}
- String[] localVarAuthNames = new String[] {"Basic"};
- return localVarApiClient.buildCall(
- basePath,
- localVarPath,
- "GET",
- localVarQueryParams,
- localVarCollectionQueryParams,
- localVarPostBody,
- localVarHeaderParams,
- localVarCookieParams,
- localVarFormParams,
- localVarAuthNames,
- _callback);
+ String[] localVarAuthNames = new String[] { "Basic" };
+ return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
}
@SuppressWarnings("rawtypes")
- private okhttp3.Call getOrganizationAuditlogsValidateBeforeCall(
- UUID organizationId,
- UUID productId,
- UUID configId,
- UUID environmentId,
- AuditLogType auditLogType,
- OffsetDateTime fromUtcDateTime,
- OffsetDateTime toUtcDateTime,
- final ApiCallback _callback)
- throws ApiException {
+ private okhttp3.Call getOrganizationAuditlogsValidateBeforeCall(UUID organizationId, UUID productId, UUID configId, UUID environmentId, AuditLogType auditLogType, OffsetDateTime fromUtcDateTime, OffsetDateTime toUtcDateTime, final ApiCallback _callback) throws ApiException {
// verify the required parameter 'organizationId' is set
if (organizationId == null) {
- throw new ApiException(
- "Missing the required parameter 'organizationId' when calling"
- + " getOrganizationAuditlogs(Async)");
+ throw new ApiException("Missing the required parameter 'organizationId' when calling getOrganizationAuditlogs(Async)");
}
- return getOrganizationAuditlogsCall(
- organizationId,
- productId,
- configId,
- environmentId,
- auditLogType,
- fromUtcDateTime,
- toUtcDateTime,
- _callback);
+ return getOrganizationAuditlogsCall(organizationId, productId, configId, environmentId, auditLogType, fromUtcDateTime, toUtcDateTime, _callback);
+
}
/**
- * List Audit log items for Organization This endpoint returns the list of Audit log items for a
- * given Organization and the result can be optionally filtered by Product and/or Config and/or
- * Environment.
- *
+ * List Audit log items for Organization
+ * This endpoint returns the list of Audit log items for a given Organization and the result can be optionally filtered by Product and/or Config and/or Environment.
* @param organizationId The identifier of the Organization. (required)
* @param productId The identifier of the Product. (optional)
* @param configId The identifier of the Config. (optional)
@@ -652,43 +498,24 @@ private okhttp3.Call getOrganizationAuditlogsValidateBeforeCall(
* @param fromUtcDateTime Filter Audit logs by starting UTC date. (optional)
* @param toUtcDateTime Filter Audit logs by ending UTC date. (optional)
* @return List<AuditLogItemModel>
- * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the
- * response body
+ * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @http.response.details
- *
- * | Status Code | Description | Response Headers |
- * | 200 | | - |
- * | 400 | Bad request. | - |
- * | 404 | Not found. | - |
- * | 429 | Too many requests. In case of the request rate exceeds the rate limits. | - |
- *
+
+ | Status Code | Description | Response Headers |
+ | 200 | | - |
+ | 400 | Bad request. | - |
+ | 404 | Not found. | - |
+ | 429 | Too many requests. In case of the request rate exceeds the rate limits. | - |
+
*/
- public List getOrganizationAuditlogs(
- UUID organizationId,
- UUID productId,
- UUID configId,
- UUID environmentId,
- AuditLogType auditLogType,
- OffsetDateTime fromUtcDateTime,
- OffsetDateTime toUtcDateTime)
- throws ApiException {
- ApiResponse> localVarResp =
- getOrganizationAuditlogsWithHttpInfo(
- organizationId,
- productId,
- configId,
- environmentId,
- auditLogType,
- fromUtcDateTime,
- toUtcDateTime);
+ public List getOrganizationAuditlogs(UUID organizationId, UUID productId, UUID configId, UUID environmentId, AuditLogType auditLogType, OffsetDateTime fromUtcDateTime, OffsetDateTime toUtcDateTime) throws ApiException {
+ ApiResponse> localVarResp = getOrganizationAuditlogsWithHttpInfo(organizationId, productId, configId, environmentId, auditLogType, fromUtcDateTime, toUtcDateTime);
return localVarResp.getData();
}
/**
- * List Audit log items for Organization This endpoint returns the list of Audit log items for a
- * given Organization and the result can be optionally filtered by Product and/or Config and/or
- * Environment.
- *
+ * List Audit log items for Organization
+ * This endpoint returns the list of Audit log items for a given Organization and the result can be optionally filtered by Product and/or Config and/or Environment.
* @param organizationId The identifier of the Organization. (required)
* @param productId The identifier of the Product. (optional)
* @param configId The identifier of the Config. (optional)
@@ -697,45 +524,25 @@ public List getOrganizationAuditlogs(
* @param fromUtcDateTime Filter Audit logs by starting UTC date. (optional)
* @param toUtcDateTime Filter Audit logs by ending UTC date. (optional)
* @return ApiResponse<List<AuditLogItemModel>>
- * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the
- * response body
+ * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @http.response.details
- *
- * | Status Code | Description | Response Headers |
- * | 200 | | - |
- * | 400 | Bad request. | - |
- * | 404 | Not found. | - |
- * | 429 | Too many requests. In case of the request rate exceeds the rate limits. | - |
- *
+
+ | Status Code | Description | Response Headers |
+ | 200 | | - |
+ | 400 | Bad request. | - |
+ | 404 | Not found. | - |
+ | 429 | Too many requests. In case of the request rate exceeds the rate limits. | - |
+
*/
- public ApiResponse> getOrganizationAuditlogsWithHttpInfo(
- UUID organizationId,
- UUID productId,
- UUID configId,
- UUID environmentId,
- AuditLogType auditLogType,
- OffsetDateTime fromUtcDateTime,
- OffsetDateTime toUtcDateTime)
- throws ApiException {
- okhttp3.Call localVarCall =
- getOrganizationAuditlogsValidateBeforeCall(
- organizationId,
- productId,
- configId,
- environmentId,
- auditLogType,
- fromUtcDateTime,
- toUtcDateTime,
- null);
- Type localVarReturnType = new TypeToken>() {}.getType();
+ public ApiResponse> getOrganizationAuditlogsWithHttpInfo(UUID organizationId, UUID productId, UUID configId, UUID environmentId, AuditLogType auditLogType, OffsetDateTime fromUtcDateTime, OffsetDateTime toUtcDateTime) throws ApiException {
+ okhttp3.Call localVarCall = getOrganizationAuditlogsValidateBeforeCall(organizationId, productId, configId, environmentId, auditLogType, fromUtcDateTime, toUtcDateTime, null);
+ Type localVarReturnType = new TypeToken>(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
}
/**
- * List Audit log items for Organization (asynchronously) This endpoint returns the list of
- * Audit log items for a given Organization and the result can be optionally filtered by Product
- * and/or Config and/or Environment.
- *
+ * List Audit log items for Organization (asynchronously)
+ * This endpoint returns the list of Audit log items for a given Organization and the result can be optionally filtered by Product and/or Config and/or Environment.
* @param organizationId The identifier of the Organization. (required)
* @param productId The identifier of the Product. (optional)
* @param configId The identifier of the Config. (optional)
@@ -745,39 +552,20 @@ public ApiResponse> getOrganizationAuditlogsWithHttpInfo
* @param toUtcDateTime Filter Audit logs by ending UTC date. (optional)
* @param _callback The callback to be executed when the API call finishes
* @return The request call
- * @throws ApiException If fail to process the API call, e.g. serializing the request body
- * object
+ * @throws ApiException If fail to process the API call, e.g. serializing the request body object
* @http.response.details
- *
- * | Status Code | Description | Response Headers |
- * | 200 | | - |
- * | 400 | Bad request. | - |
- * | 404 | Not found. | - |
- * | 429 | Too many requests. In case of the request rate exceeds the rate limits. | - |
- *
+
+ | Status Code | Description | Response Headers |
+ | 200 | | - |
+ | 400 | Bad request. | - |
+ | 404 | Not found. | - |
+ | 429 | Too many requests. In case of the request rate exceeds the rate limits. | - |
+
*/
- public okhttp3.Call getOrganizationAuditlogsAsync(
- UUID organizationId,
- UUID productId,
- UUID configId,
- UUID environmentId,
- AuditLogType auditLogType,
- OffsetDateTime fromUtcDateTime,
- OffsetDateTime toUtcDateTime,
- final ApiCallback> _callback)
- throws ApiException {
-
- okhttp3.Call localVarCall =
- getOrganizationAuditlogsValidateBeforeCall(
- organizationId,
- productId,
- configId,
- environmentId,
- auditLogType,
- fromUtcDateTime,
- toUtcDateTime,
- _callback);
- Type localVarReturnType = new TypeToken>() {}.getType();
+ public okhttp3.Call getOrganizationAuditlogsAsync(UUID organizationId, UUID productId, UUID configId, UUID environmentId, AuditLogType auditLogType, OffsetDateTime fromUtcDateTime, OffsetDateTime toUtcDateTime, final ApiCallback> _callback) throws ApiException {
+
+ okhttp3.Call localVarCall = getOrganizationAuditlogsValidateBeforeCall(organizationId, productId, configId, environmentId, auditLogType, fromUtcDateTime, toUtcDateTime, _callback);
+ Type localVarReturnType = new TypeToken>(){}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
diff --git a/src/main/java/com/configcat/publicapi/java/client/api/CodeReferencesApi.java b/src/main/java/com/configcat/publicapi/java/client/api/CodeReferencesApi.java
index b477637..22e4524 100644
--- a/src/main/java/com/configcat/publicapi/java/client/api/CodeReferencesApi.java
+++ b/src/main/java/com/configcat/publicapi/java/client/api/CodeReferencesApi.java
@@ -1,6 +1,6 @@
/*
* ConfigCat Public Management API
- * The purpose of this API is to access the ConfigCat platform programmatically. You can **Create**, **Read**, **Update** and **Delete** any entities like **Feature Flags, Configs, Environments** or **Products** within ConfigCat. **Base API URL**: https://api.configcat.com If you prefer the swagger documentation, you can find it here: [Swagger UI](https://api.configcat.com/swagger). The API is based on HTTP REST, uses resource-oriented URLs, status codes and supports JSON format. **Important:** Do not use this API for accessing and evaluating feature flag values. Use the [SDKs](https://configcat.com/docs/sdk-reference/overview) or the [ConfigCat Proxy](https://configcat.com/docs/advanced/proxy/proxy-overview/) instead. # OpenAPI Specification The complete specification is publicly available in the following formats: - [OpenAPI v3](https://api.configcat.com/docs/v1/swagger.json) - [Swagger v2](https://api.configcat.com/docs/v1/swagger.v2.json) You can use it to generate client libraries in various languages with [OpenAPI Generator](https://github.com/OpenAPITools/openapi-generator) or [Swagger Codegen](https://swagger.io/tools/swagger-codegen/) to interact with this API. # Authentication This API uses the [Basic HTTP Authentication Scheme](https://en.wikipedia.org/wiki/Basic_access_authentication). # Throttling and rate limits All the rate limited API calls are returning information about the current rate limit period in the following HTTP headers: | Header | Description | | :- | :- | | X-Rate-Limit-Remaining | The maximum number of requests remaining in the current rate limit period. | | X-Rate-Limit-Reset | The time when the current rate limit period resets. | When the rate limit is exceeded by a request, the API returns with a `HTTP 429 - Too many requests` status along with a `Retry-After` HTTP header.
+ * The purpose of this API is to access the ConfigCat platform programmatically. You can **Create**, **Read**, **Update** and **Delete** any entities like **Feature Flags, Configs, Environments** or **Products** within ConfigCat. **Base API URL**: https://api.configcat.com If you prefer the swagger documentation, you can find it here: [Swagger UI](https://api.configcat.com/swagger). The API is based on HTTP REST, uses resource-oriented URLs, status codes and supports JSON format. **Important:** Do not use this API for accessing and evaluating feature flag values. Use the [SDKs](https://configcat.com/docs/sdk-reference/overview) or the [ConfigCat Proxy](https://configcat.com/docs/advanced/proxy/proxy-overview/) instead. # OpenAPI Specification The complete specification is publicly available in the following formats: - [OpenAPI v3](https://api.configcat.com/docs/v1/swagger.json) - [Swagger v2](https://api.configcat.com/docs/v1/swagger.v2.json) You can use it to generate client libraries in various languages with [OpenAPI Generator](https://github.com/OpenAPITools/openapi-generator) or [Swagger Codegen](https://swagger.io/tools/swagger-codegen/) to interact with this API. # Authentication This API uses the [Basic HTTP Authentication Scheme](https://en.wikipedia.org/wiki/Basic_access_authentication). # Throttling and rate limits All the rate limited API calls are returning information about the current rate limit period in the following HTTP headers: | Header | Description | | :- | :- | | X-Rate-Limit-Remaining | The maximum number of requests remaining in the current rate limit period. | | X-Rate-Limit-Reset | The time when the current rate limit period resets. | When the rate limit is exceeded by a request, the API returns with a `HTTP 429 - Too many requests` status along with a `Retry-After` HTTP header.
*
* The version of the OpenAPI document: v1
* Contact: support@configcat.com
@@ -10,8 +10,8 @@
* Do not edit the class manually.
*/
-package com.configcat.publicapi.java.client.api;
+package com.configcat.publicapi.java.client.api;
import com.configcat.publicapi.java.client.ApiCallback;
import com.configcat.publicapi.java.client.ApiClient;
@@ -19,10 +19,18 @@
import com.configcat.publicapi.java.client.ApiResponse;
import com.configcat.publicapi.java.client.Configuration;
import com.configcat.publicapi.java.client.Pair;
+import com.configcat.publicapi.java.client.ProgressRequestBody;
+import com.configcat.publicapi.java.client.ProgressResponseBody;
+
+import com.google.gson.reflect.TypeToken;
+
+import java.io.IOException;
+
+
import com.configcat.publicapi.java.client.model.CodeReferenceModel;
import com.configcat.publicapi.java.client.model.CodeReferenceRequest;
import com.configcat.publicapi.java.client.model.DeleteRepositoryReportsRequest;
-import com.google.gson.reflect.TypeToken;
+
import java.lang.reflect.Type;
import java.util.ArrayList;
import java.util.HashMap;
@@ -68,32 +76,28 @@ public void setCustomBaseUrl(String customBaseUrl) {
/**
* Build call for v1CodeReferencesDeleteReportsPost
- *
- * @param deleteRepositoryReportsRequest (required)
+ * @param deleteRepositoryReportsRequest (required)
* @param _callback Callback for upload/download progress
* @return Call to execute
* @throws ApiException If fail to serialize the request body object
* @http.response.details
- *
- * | Status Code | Description | Response Headers |
- * | 200 | OK | - |
- * | 400 | Bad request. | - |
- * | 404 | Not found. | - |
- * | 429 | Too many requests. In case of the request rate exceeds the rate limits. | - |
- *
+
+ | Status Code | Description | Response Headers |
+ | 200 | OK | - |
+ | 400 | Bad request. | - |
+ | 404 | Not found. | - |
+ | 429 | Too many requests. In case of the request rate exceeds the rate limits. | - |
+
*/
- public okhttp3.Call v1CodeReferencesDeleteReportsPostCall(
- DeleteRepositoryReportsRequest deleteRepositoryReportsRequest,
- final ApiCallback _callback)
- throws ApiException {
+ public okhttp3.Call v1CodeReferencesDeleteReportsPostCall(DeleteRepositoryReportsRequest deleteRepositoryReportsRequest, final ApiCallback _callback) throws ApiException {
String basePath = null;
// Operation Servers
- String[] localBasePaths = new String[] {};
+ String[] localBasePaths = new String[] { };
// Determine Base Path to Use
- if (localCustomBaseUrl != null) {
+ if (localCustomBaseUrl != null){
basePath = localCustomBaseUrl;
- } else if (localBasePaths.length > 0) {
+ } else if ( localBasePaths.length > 0 ) {
basePath = localBasePaths[localHostIndex];
} else {
basePath = null;
@@ -110,150 +114,122 @@ public okhttp3.Call v1CodeReferencesDeleteReportsPostCall(
Map localVarCookieParams = new HashMap();
Map localVarFormParams = new HashMap();
- final String[] localVarAccepts = {};
+ final String[] localVarAccepts = {
+ };
final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
if (localVarAccept != null) {
localVarHeaderParams.put("Accept", localVarAccept);
}
final String[] localVarContentTypes = {
- "application/json", "text/json", "application/*+json"
+ "application/json",
+ "text/json",
+ "application/*+json"
};
- final String localVarContentType =
- localVarApiClient.selectHeaderContentType(localVarContentTypes);
+ final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
if (localVarContentType != null) {
localVarHeaderParams.put("Content-Type", localVarContentType);
}
- String[] localVarAuthNames = new String[] {"Basic"};
- return localVarApiClient.buildCall(
- basePath,
- localVarPath,
- "POST",
- localVarQueryParams,
- localVarCollectionQueryParams,
- localVarPostBody,
- localVarHeaderParams,
- localVarCookieParams,
- localVarFormParams,
- localVarAuthNames,
- _callback);
+ String[] localVarAuthNames = new String[] { "Basic" };
+ return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
}
@SuppressWarnings("rawtypes")
- private okhttp3.Call v1CodeReferencesDeleteReportsPostValidateBeforeCall(
- DeleteRepositoryReportsRequest deleteRepositoryReportsRequest,
- final ApiCallback _callback)
- throws ApiException {
+ private okhttp3.Call v1CodeReferencesDeleteReportsPostValidateBeforeCall(DeleteRepositoryReportsRequest deleteRepositoryReportsRequest, final ApiCallback _callback) throws ApiException {
// verify the required parameter 'deleteRepositoryReportsRequest' is set
if (deleteRepositoryReportsRequest == null) {
- throw new ApiException(
- "Missing the required parameter 'deleteRepositoryReportsRequest' when calling"
- + " v1CodeReferencesDeleteReportsPost(Async)");
+ throw new ApiException("Missing the required parameter 'deleteRepositoryReportsRequest' when calling v1CodeReferencesDeleteReportsPost(Async)");
}
return v1CodeReferencesDeleteReportsPostCall(deleteRepositoryReportsRequest, _callback);
+
}
/**
* Delete Reference reports
- *
- * @param deleteRepositoryReportsRequest (required)
- * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the
- * response body
+ *
+ * @param deleteRepositoryReportsRequest (required)
+ * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @http.response.details
- *
- * | Status Code | Description | Response Headers |
- * | 200 | OK | - |
- * | 400 | Bad request. | - |
- * | 404 | Not found. | - |
- * | 429 | Too many requests. In case of the request rate exceeds the rate limits. | - |
- *
+
+ | Status Code | Description | Response Headers |
+ | 200 | OK | - |
+ | 400 | Bad request. | - |
+ | 404 | Not found. | - |
+ | 429 | Too many requests. In case of the request rate exceeds the rate limits. | - |
+
*/
- public void v1CodeReferencesDeleteReportsPost(
- DeleteRepositoryReportsRequest deleteRepositoryReportsRequest) throws ApiException {
+ public void v1CodeReferencesDeleteReportsPost(DeleteRepositoryReportsRequest deleteRepositoryReportsRequest) throws ApiException {
v1CodeReferencesDeleteReportsPostWithHttpInfo(deleteRepositoryReportsRequest);
}
/**
* Delete Reference reports
- *
- * @param deleteRepositoryReportsRequest (required)
+ *
+ * @param deleteRepositoryReportsRequest (required)
* @return ApiResponse<Void>
- * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the
- * response body
+ * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @http.response.details
- *
- * | Status Code | Description | Response Headers |
- * | 200 | OK | - |
- * | 400 | Bad request. | - |
- * | 404 | Not found. | - |
- * | 429 | Too many requests. In case of the request rate exceeds the rate limits. | - |
- *
+
+ | Status Code | Description | Response Headers |
+ | 200 | OK | - |
+ | 400 | Bad request. | - |
+ | 404 | Not found. | - |
+ | 429 | Too many requests. In case of the request rate exceeds the rate limits. | - |
+
*/
- public ApiResponse v1CodeReferencesDeleteReportsPostWithHttpInfo(
- DeleteRepositoryReportsRequest deleteRepositoryReportsRequest) throws ApiException {
- okhttp3.Call localVarCall =
- v1CodeReferencesDeleteReportsPostValidateBeforeCall(
- deleteRepositoryReportsRequest, null);
+ public ApiResponse v1CodeReferencesDeleteReportsPostWithHttpInfo(DeleteRepositoryReportsRequest deleteRepositoryReportsRequest) throws ApiException {
+ okhttp3.Call localVarCall = v1CodeReferencesDeleteReportsPostValidateBeforeCall(deleteRepositoryReportsRequest, null);
return localVarApiClient.execute(localVarCall);
}
/**
* Delete Reference reports (asynchronously)
- *
- * @param deleteRepositoryReportsRequest (required)
+ *
+ * @param deleteRepositoryReportsRequest (required)
* @param _callback The callback to be executed when the API call finishes
* @return The request call
- * @throws ApiException If fail to process the API call, e.g. serializing the request body
- * object
+ * @throws ApiException If fail to process the API call, e.g. serializing the request body object
* @http.response.details
- *
- * | Status Code | Description | Response Headers |
- * | 200 | OK | - |
- * | 400 | Bad request. | - |
- * | 404 | Not found. | - |
- * | 429 | Too many requests. In case of the request rate exceeds the rate limits. | - |
- *
+
+ | Status Code | Description | Response Headers |
+ | 200 | OK | - |
+ | 400 | Bad request. | - |
+ | 404 | Not found. | - |
+ | 429 | Too many requests. In case of the request rate exceeds the rate limits. | - |
+
*/
- public okhttp3.Call v1CodeReferencesDeleteReportsPostAsync(
- DeleteRepositoryReportsRequest deleteRepositoryReportsRequest,
- final ApiCallback _callback)
- throws ApiException {
-
- okhttp3.Call localVarCall =
- v1CodeReferencesDeleteReportsPostValidateBeforeCall(
- deleteRepositoryReportsRequest, _callback);
+ public okhttp3.Call v1CodeReferencesDeleteReportsPostAsync(DeleteRepositoryReportsRequest deleteRepositoryReportsRequest, final ApiCallback _callback) throws ApiException {
+
+ okhttp3.Call localVarCall = v1CodeReferencesDeleteReportsPostValidateBeforeCall(deleteRepositoryReportsRequest, _callback);
localVarApiClient.executeAsync(localVarCall, _callback);
return localVarCall;
}
/**
* Build call for v1CodeReferencesPost
- *
- * @param codeReferenceRequest (required)
+ * @param codeReferenceRequest (required)
* @param _callback Callback for upload/download progress
* @return Call to execute
* @throws ApiException If fail to serialize the request body object
* @http.response.details
- *
- * | Status Code | Description | Response Headers |
- * | 200 | OK | - |
- * | 400 | Bad request. | - |
- * | 404 | Not found. | - |
- * | 429 | Too many requests. In case of the request rate exceeds the rate limits. | - |
- *
+
+ | Status Code | Description | Response Headers |
+ | 200 | OK | - |
+ | 400 | Bad request. | - |
+ | 404 | Not found. | - |
+ | 429 | Too many requests. In case of the request rate exceeds the rate limits. | - |
+
*/
- public okhttp3.Call v1CodeReferencesPostCall(
- CodeReferenceRequest codeReferenceRequest, final ApiCallback _callback)
- throws ApiException {
+ public okhttp3.Call v1CodeReferencesPostCall(CodeReferenceRequest codeReferenceRequest, final ApiCallback _callback) throws ApiException {
String basePath = null;
// Operation Servers
- String[] localBasePaths = new String[] {};
+ String[] localBasePaths = new String[] { };
// Determine Base Path to Use
- if (localCustomBaseUrl != null) {
+ if (localCustomBaseUrl != null){
basePath = localCustomBaseUrl;
- } else if (localBasePaths.length > 0) {
+ } else if ( localBasePaths.length > 0 ) {
basePath = localBasePaths[localHostIndex];
} else {
basePath = null;
@@ -270,145 +246,122 @@ public okhttp3.Call v1CodeReferencesPostCall(
Map localVarCookieParams = new HashMap();
Map localVarFormParams = new HashMap();
- final String[] localVarAccepts = {};
+ final String[] localVarAccepts = {
+ };
final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
if (localVarAccept != null) {
localVarHeaderParams.put("Accept", localVarAccept);
}
final String[] localVarContentTypes = {
- "application/json", "text/json", "application/*+json"
+ "application/json",
+ "text/json",
+ "application/*+json"
};
- final String localVarContentType =
- localVarApiClient.selectHeaderContentType(localVarContentTypes);
+ final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
if (localVarContentType != null) {
localVarHeaderParams.put("Content-Type", localVarContentType);
}
- String[] localVarAuthNames = new String[] {"Basic"};
- return localVarApiClient.buildCall(
- basePath,
- localVarPath,
- "POST",
- localVarQueryParams,
- localVarCollectionQueryParams,
- localVarPostBody,
- localVarHeaderParams,
- localVarCookieParams,
- localVarFormParams,
- localVarAuthNames,
- _callback);
+ String[] localVarAuthNames = new String[] { "Basic" };
+ return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
}
@SuppressWarnings("rawtypes")
- private okhttp3.Call v1CodeReferencesPostValidateBeforeCall(
- CodeReferenceRequest codeReferenceRequest, final ApiCallback _callback)
- throws ApiException {
+ private okhttp3.Call v1CodeReferencesPostValidateBeforeCall(CodeReferenceRequest codeReferenceRequest, final ApiCallback _callback) throws ApiException {
// verify the required parameter 'codeReferenceRequest' is set
if (codeReferenceRequest == null) {
- throw new ApiException(
- "Missing the required parameter 'codeReferenceRequest' when calling"
- + " v1CodeReferencesPost(Async)");
+ throw new ApiException("Missing the required parameter 'codeReferenceRequest' when calling v1CodeReferencesPost(Async)");
}
return v1CodeReferencesPostCall(codeReferenceRequest, _callback);
+
}
/**
* Upload References
- *
- * @param codeReferenceRequest (required)
- * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the
- * response body
+ *
+ * @param codeReferenceRequest (required)
+ * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @http.response.details
- *
- * | Status Code | Description | Response Headers |
- * | 200 | OK | - |
- * | 400 | Bad request. | - |
- * | 404 | Not found. | - |
- * | 429 | Too many requests. In case of the request rate exceeds the rate limits. | - |
- *
+
+ | Status Code | Description | Response Headers |
+ | 200 | OK | - |
+ | 400 | Bad request. | - |
+ | 404 | Not found. | - |
+ | 429 | Too many requests. In case of the request rate exceeds the rate limits. | - |
+
*/
- public void v1CodeReferencesPost(CodeReferenceRequest codeReferenceRequest)
- throws ApiException {
+ public void v1CodeReferencesPost(CodeReferenceRequest codeReferenceRequest) throws ApiException {
v1CodeReferencesPostWithHttpInfo(codeReferenceRequest);
}
/**
* Upload References
- *
- * @param codeReferenceRequest (required)
+ *
+ * @param codeReferenceRequest (required)
* @return ApiResponse<Void>
- * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the
- * response body
+ * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @http.response.details
- *
- * | Status Code | Description | Response Headers |
- * | 200 | OK | - |
- * | 400 | Bad request. | - |
- * | 404 | Not found. | - |
- * | 429 | Too many requests. In case of the request rate exceeds the rate limits. | - |
- *
+
+ | Status Code | Description | Response Headers |
+ | 200 | OK | - |
+ | 400 | Bad request. | - |
+ | 404 | Not found. | - |
+ | 429 | Too many requests. In case of the request rate exceeds the rate limits. | - |
+
*/
- public ApiResponse v1CodeReferencesPostWithHttpInfo(
- CodeReferenceRequest codeReferenceRequest) throws ApiException {
- okhttp3.Call localVarCall =
- v1CodeReferencesPostValidateBeforeCall(codeReferenceRequest, null);
+ public ApiResponse v1CodeReferencesPostWithHttpInfo(CodeReferenceRequest codeReferenceRequest) throws ApiException {
+ okhttp3.Call localVarCall = v1CodeReferencesPostValidateBeforeCall(codeReferenceRequest, null);
return localVarApiClient.execute(localVarCall);
}
/**
* Upload References (asynchronously)
- *
- * @param codeReferenceRequest (required)
+ *
+ * @param codeReferenceRequest (required)
* @param _callback The callback to be executed when the API call finishes
* @return The request call
- * @throws ApiException If fail to process the API call, e.g. serializing the request body
- * object
+ * @throws ApiException If fail to process the API call, e.g. serializing the request body object
* @http.response.details
- *
- * | Status Code | Description | Response Headers |
- * | 200 | OK | - |
- * | 400 | Bad request. | - |
- * | 404 | Not found. | - |
- * | 429 | Too many requests. In case of the request rate exceeds the rate limits. | - |
- *
+
+ | Status Code | Description | Response Headers |
+ | 200 | OK | - |
+ | 400 | Bad request. | - |
+ | 404 | Not found. | - |
+ | 429 | Too many requests. In case of the request rate exceeds the rate limits. | - |
+
*/
- public okhttp3.Call v1CodeReferencesPostAsync(
- CodeReferenceRequest codeReferenceRequest, final ApiCallback _callback)
- throws ApiException {
+ public okhttp3.Call v1CodeReferencesPostAsync(CodeReferenceRequest codeReferenceRequest, final ApiCallback _callback) throws ApiException {
- okhttp3.Call localVarCall =
- v1CodeReferencesPostValidateBeforeCall(codeReferenceRequest, _callback);
+ okhttp3.Call localVarCall = v1CodeReferencesPostValidateBeforeCall(codeReferenceRequest, _callback);
localVarApiClient.executeAsync(localVarCall, _callback);
return localVarCall;
}
/**
* Build call for v1SettingsSettingIdCodeReferencesGet
- *
* @param settingId The identifier of the Feature Flag or Setting. (required)
* @param _callback Callback for upload/download progress
* @return Call to execute
* @throws ApiException If fail to serialize the request body object
* @http.response.details
- *
- * | Status Code | Description | Response Headers |
- * | 200 | | - |
- * | 400 | Bad request. | - |
- * | 404 | Not found. | - |
- * | 429 | Too many requests. In case of the request rate exceeds the rate limits. | - |
- *
+
+ | Status Code | Description | Response Headers |
+ | 200 | | - |
+ | 400 | Bad request. | - |
+ | 404 | Not found. | - |
+ | 429 | Too many requests. In case of the request rate exceeds the rate limits. | - |
+
*/
- public okhttp3.Call v1SettingsSettingIdCodeReferencesGetCall(
- Integer settingId, final ApiCallback _callback) throws ApiException {
+ public okhttp3.Call v1SettingsSettingIdCodeReferencesGetCall(Integer settingId, final ApiCallback _callback) throws ApiException {
String basePath = null;
// Operation Servers
- String[] localBasePaths = new String[] {};
+ String[] localBasePaths = new String[] { };
// Determine Base Path to Use
- if (localCustomBaseUrl != null) {
+ if (localCustomBaseUrl != null){
basePath = localCustomBaseUrl;
- } else if (localBasePaths.length > 0) {
+ } else if ( localBasePaths.length > 0 ) {
basePath = localBasePaths[localHostIndex];
} else {
basePath = null;
@@ -417,11 +370,8 @@ public okhttp3.Call v1SettingsSettingIdCodeReferencesGetCall(
Object localVarPostBody = null;
// create path and map variables
- String localVarPath =
- "/v1/settings/{settingId}/code-references"
- .replace(
- "{" + "settingId" + "}",
- localVarApiClient.escapeString(settingId.toString()));
+ String localVarPath = "/v1/settings/{settingId}/code-references"
+ .replace("{" + "settingId" + "}", localVarApiClient.escapeString(settingId.toString()));
List localVarQueryParams = new ArrayList();
List localVarCollectionQueryParams = new ArrayList();
@@ -429,118 +379,97 @@ public okhttp3.Call v1SettingsSettingIdCodeReferencesGetCall(
Map localVarCookieParams = new HashMap();
Map localVarFormParams = new HashMap();
- final String[] localVarAccepts = {"application/json"};
+ final String[] localVarAccepts = {
+ "application/json"
+ };
final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
if (localVarAccept != null) {
localVarHeaderParams.put("Accept", localVarAccept);
}
- final String[] localVarContentTypes = {};
- final String localVarContentType =
- localVarApiClient.selectHeaderContentType(localVarContentTypes);
+ final String[] localVarContentTypes = {
+ };
+ final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
if (localVarContentType != null) {
localVarHeaderParams.put("Content-Type", localVarContentType);
}
- String[] localVarAuthNames = new String[] {"Basic"};
- return localVarApiClient.buildCall(
- basePath,
- localVarPath,
- "GET",
- localVarQueryParams,
- localVarCollectionQueryParams,
- localVarPostBody,
- localVarHeaderParams,
- localVarCookieParams,
- localVarFormParams,
- localVarAuthNames,
- _callback);
+ String[] localVarAuthNames = new String[] { "Basic" };
+ return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
}
@SuppressWarnings("rawtypes")
- private okhttp3.Call v1SettingsSettingIdCodeReferencesGetValidateBeforeCall(
- Integer settingId, final ApiCallback _callback) throws ApiException {
+ private okhttp3.Call v1SettingsSettingIdCodeReferencesGetValidateBeforeCall(Integer settingId, final ApiCallback _callback) throws ApiException {
// verify the required parameter 'settingId' is set
if (settingId == null) {
- throw new ApiException(
- "Missing the required parameter 'settingId' when calling"
- + " v1SettingsSettingIdCodeReferencesGet(Async)");
+ throw new ApiException("Missing the required parameter 'settingId' when calling v1SettingsSettingIdCodeReferencesGet(Async)");
}
return v1SettingsSettingIdCodeReferencesGetCall(settingId, _callback);
+
}
/**
* Get References for Feature Flag or Setting
- *
+ *
* @param settingId The identifier of the Feature Flag or Setting. (required)
* @return List<CodeReferenceModel>
- * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the
- * response body
+ * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @http.response.details
- *
- * | Status Code | Description | Response Headers |
- * | 200 | | - |
- * | 400 | Bad request. | - |
- * | 404 | Not found. | - |
- * | 429 | Too many requests. In case of the request rate exceeds the rate limits. | - |
- *
+
+ | Status Code | Description | Response Headers |
+ | 200 | | - |
+ | 400 | Bad request. | - |
+ | 404 | Not found. | - |
+ | 429 | Too many requests. In case of the request rate exceeds the rate limits. | - |
+
*/
- public List v1SettingsSettingIdCodeReferencesGet(Integer settingId)
- throws ApiException {
- ApiResponse> localVarResp =
- v1SettingsSettingIdCodeReferencesGetWithHttpInfo(settingId);
+ public List v1SettingsSettingIdCodeReferencesGet(Integer settingId) throws ApiException {
+ ApiResponse> localVarResp = v1SettingsSettingIdCodeReferencesGetWithHttpInfo(settingId);
return localVarResp.getData();
}
/**
* Get References for Feature Flag or Setting
- *
+ *
* @param settingId The identifier of the Feature Flag or Setting. (required)
* @return ApiResponse<List<CodeReferenceModel>>
- * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the
- * response body
+ * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @http.response.details
- *
- * | Status Code | Description | Response Headers |
- * | 200 | | - |
- * | 400 | Bad request. | - |
- * | 404 | Not found. | - |
- * | 429 | Too many requests. In case of the request rate exceeds the rate limits. | - |
- *
+
+ | Status Code | Description | Response Headers |
+ | 200 | | - |
+ | 400 | Bad request. | - |
+ | 404 | Not found. | - |
+ | 429 | Too many requests. In case of the request rate exceeds the rate limits. | - |
+
*/
- public ApiResponse> v1SettingsSettingIdCodeReferencesGetWithHttpInfo(
- Integer settingId) throws ApiException {
- okhttp3.Call localVarCall =
- v1SettingsSettingIdCodeReferencesGetValidateBeforeCall(settingId, null);
- Type localVarReturnType = new TypeToken>() {}.getType();
+ public ApiResponse> v1SettingsSettingIdCodeReferencesGetWithHttpInfo(Integer settingId) throws ApiException {
+ okhttp3.Call localVarCall = v1SettingsSettingIdCodeReferencesGetValidateBeforeCall(settingId, null);
+ Type localVarReturnType = new TypeToken>(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
}
/**
* Get References for Feature Flag or Setting (asynchronously)
- *
+ *
* @param settingId The identifier of the Feature Flag or Setting. (required)
* @param _callback The callback to be executed when the API call finishes
* @return The request call
- * @throws ApiException If fail to process the API call, e.g. serializing the request body
- * object
+ * @throws ApiException If fail to process the API call, e.g. serializing the request body object
* @http.response.details
- *
- * | Status Code | Description | Response Headers |
- * | 200 | | - |
- * | 400 | Bad request. | - |
- * | 404 | Not found. | - |
- * | 429 | Too many requests. In case of the request rate exceeds the rate limits. | - |
- *
+
+ | Status Code | Description | Response Headers |
+ | 200 | | - |
+ | 400 | Bad request. | - |
+ | 404 | Not found. | - |
+ | 429 | Too many requests. In case of the request rate exceeds the rate limits. | - |
+
*/
- public okhttp3.Call v1SettingsSettingIdCodeReferencesGetAsync(
- Integer settingId, final ApiCallback> _callback)
- throws ApiException {
+ public okhttp3.Call v1SettingsSettingIdCodeReferencesGetAsync(Integer settingId, final ApiCallback> _callback) throws ApiException {
- okhttp3.Call localVarCall =
- v1SettingsSettingIdCodeReferencesGetValidateBeforeCall(settingId, _callback);
- Type localVarReturnType = new TypeToken>() {}.getType();
+ okhttp3.Call localVarCall = v1SettingsSettingIdCodeReferencesGetValidateBeforeCall(settingId, _callback);
+ Type localVarReturnType = new TypeToken>(){}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
diff --git a/src/main/java/com/configcat/publicapi/java/client/api/ConfigsApi.java b/src/main/java/com/configcat/publicapi/java/client/api/ConfigsApi.java
index 64a1e4a..d664bcb 100644
--- a/src/main/java/com/configcat/publicapi/java/client/api/ConfigsApi.java
+++ b/src/main/java/com/configcat/publicapi/java/client/api/ConfigsApi.java
@@ -1,6 +1,6 @@
/*
* ConfigCat Public Management API
- * The purpose of this API is to access the ConfigCat platform programmatically. You can **Create**, **Read**, **Update** and **Delete** any entities like **Feature Flags, Configs, Environments** or **Products** within ConfigCat. **Base API URL**: https://api.configcat.com If you prefer the swagger documentation, you can find it here: [Swagger UI](https://api.configcat.com/swagger). The API is based on HTTP REST, uses resource-oriented URLs, status codes and supports JSON format. **Important:** Do not use this API for accessing and evaluating feature flag values. Use the [SDKs](https://configcat.com/docs/sdk-reference/overview) or the [ConfigCat Proxy](https://configcat.com/docs/advanced/proxy/proxy-overview/) instead. # OpenAPI Specification The complete specification is publicly available in the following formats: - [OpenAPI v3](https://api.configcat.com/docs/v1/swagger.json) - [Swagger v2](https://api.configcat.com/docs/v1/swagger.v2.json) You can use it to generate client libraries in various languages with [OpenAPI Generator](https://github.com/OpenAPITools/openapi-generator) or [Swagger Codegen](https://swagger.io/tools/swagger-codegen/) to interact with this API. # Authentication This API uses the [Basic HTTP Authentication Scheme](https://en.wikipedia.org/wiki/Basic_access_authentication). # Throttling and rate limits All the rate limited API calls are returning information about the current rate limit period in the following HTTP headers: | Header | Description | | :- | :- | | X-Rate-Limit-Remaining | The maximum number of requests remaining in the current rate limit period. | | X-Rate-Limit-Reset | The time when the current rate limit period resets. | When the rate limit is exceeded by a request, the API returns with a `HTTP 429 - Too many requests` status along with a `Retry-After` HTTP header.
+ * The purpose of this API is to access the ConfigCat platform programmatically. You can **Create**, **Read**, **Update** and **Delete** any entities like **Feature Flags, Configs, Environments** or **Products** within ConfigCat. **Base API URL**: https://api.configcat.com If you prefer the swagger documentation, you can find it here: [Swagger UI](https://api.configcat.com/swagger). The API is based on HTTP REST, uses resource-oriented URLs, status codes and supports JSON format. **Important:** Do not use this API for accessing and evaluating feature flag values. Use the [SDKs](https://configcat.com/docs/sdk-reference/overview) or the [ConfigCat Proxy](https://configcat.com/docs/advanced/proxy/proxy-overview/) instead. # OpenAPI Specification The complete specification is publicly available in the following formats: - [OpenAPI v3](https://api.configcat.com/docs/v1/swagger.json) - [Swagger v2](https://api.configcat.com/docs/v1/swagger.v2.json) You can use it to generate client libraries in various languages with [OpenAPI Generator](https://github.com/OpenAPITools/openapi-generator) or [Swagger Codegen](https://swagger.io/tools/swagger-codegen/) to interact with this API. # Authentication This API uses the [Basic HTTP Authentication Scheme](https://en.wikipedia.org/wiki/Basic_access_authentication). # Throttling and rate limits All the rate limited API calls are returning information about the current rate limit period in the following HTTP headers: | Header | Description | | :- | :- | | X-Rate-Limit-Remaining | The maximum number of requests remaining in the current rate limit period. | | X-Rate-Limit-Reset | The time when the current rate limit period resets. | When the rate limit is exceeded by a request, the API returns with a `HTTP 429 - Too many requests` status along with a `Retry-After` HTTP header.
*
* The version of the OpenAPI document: v1
* Contact: support@configcat.com
@@ -10,8 +10,8 @@
* Do not edit the class manually.
*/
-package com.configcat.publicapi.java.client.api;
+package com.configcat.publicapi.java.client.api;
import com.configcat.publicapi.java.client.ApiCallback;
import com.configcat.publicapi.java.client.ApiClient;
@@ -19,16 +19,24 @@
import com.configcat.publicapi.java.client.ApiResponse;
import com.configcat.publicapi.java.client.Configuration;
import com.configcat.publicapi.java.client.Pair;
+import com.configcat.publicapi.java.client.ProgressRequestBody;
+import com.configcat.publicapi.java.client.ProgressResponseBody;
+
+import com.google.gson.reflect.TypeToken;
+
+import java.io.IOException;
+
+
import com.configcat.publicapi.java.client.model.ConfigModel;
import com.configcat.publicapi.java.client.model.CreateConfigRequest;
+import java.util.UUID;
import com.configcat.publicapi.java.client.model.UpdateConfigRequest;
-import com.google.gson.reflect.TypeToken;
+
import java.lang.reflect.Type;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
-import java.util.UUID;
public class ConfigsApi {
private ApiClient localVarApiClient;
@@ -69,32 +77,29 @@ public void setCustomBaseUrl(String customBaseUrl) {
/**
* Build call for createConfig
- *
* @param productId The identifier of the Product. (required)
- * @param createConfigRequest (required)
+ * @param createConfigRequest (required)
* @param _callback Callback for upload/download progress
* @return Call to execute
* @throws ApiException If fail to serialize the request body object
* @http.response.details
- *
- * | Status Code | Description | Response Headers |
- * | 201 | When the creation was successful. | - |
- * | 400 | Bad request. | - |
- * | 404 | Not found. | - |
- * | 429 | Too many requests. In case of the request rate exceeds the rate limits. | - |
- *
+
+ | Status Code | Description | Response Headers |
+ | 201 | When the creation was successful. | - |
+ | 400 | Bad request. | - |
+ | 404 | Not found. | - |
+ | 429 | Too many requests. In case of the request rate exceeds the rate limits. | - |
+
*/
- public okhttp3.Call createConfigCall(
- UUID productId, CreateConfigRequest createConfigRequest, final ApiCallback _callback)
- throws ApiException {
+ public okhttp3.Call createConfigCall(UUID productId, CreateConfigRequest createConfigRequest, final ApiCallback _callback) throws ApiException {
String basePath = null;
// Operation Servers
- String[] localBasePaths = new String[] {};
+ String[] localBasePaths = new String[] { };
// Determine Base Path to Use
- if (localCustomBaseUrl != null) {
+ if (localCustomBaseUrl != null){
basePath = localCustomBaseUrl;
- } else if (localBasePaths.length > 0) {
+ } else if ( localBasePaths.length > 0 ) {
basePath = localBasePaths[localHostIndex];
} else {
basePath = null;
@@ -103,11 +108,8 @@ public okhttp3.Call createConfigCall(
Object localVarPostBody = createConfigRequest;
// create path and map variables
- String localVarPath =
- "/v1/products/{productId}/configs"
- .replace(
- "{" + "productId" + "}",
- localVarApiClient.escapeString(productId.toString()));
+ String localVarPath = "/v1/products/{productId}/configs"
+ .replace("{" + "productId" + "}", localVarApiClient.escapeString(productId.toString()));
List localVarQueryParams = new ArrayList();
List localVarCollectionQueryParams = new ArrayList();
@@ -115,167 +117,135 @@ public okhttp3.Call createConfigCall(
Map localVarCookieParams = new HashMap();
Map localVarFormParams = new HashMap();
- final String[] localVarAccepts = {"application/json"};
+ final String[] localVarAccepts = {
+ "application/json"
+ };
final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
if (localVarAccept != null) {
localVarHeaderParams.put("Accept", localVarAccept);
}
final String[] localVarContentTypes = {
- "application/json", "text/json", "application/*+json"
+ "application/json",
+ "text/json",
+ "application/*+json"
};
- final String localVarContentType =
- localVarApiClient.selectHeaderContentType(localVarContentTypes);
+ final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
if (localVarContentType != null) {
localVarHeaderParams.put("Content-Type", localVarContentType);
}
- String[] localVarAuthNames = new String[] {"Basic"};
- return localVarApiClient.buildCall(
- basePath,
- localVarPath,
- "POST",
- localVarQueryParams,
- localVarCollectionQueryParams,
- localVarPostBody,
- localVarHeaderParams,
- localVarCookieParams,
- localVarFormParams,
- localVarAuthNames,
- _callback);
+ String[] localVarAuthNames = new String[] { "Basic" };
+ return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
}
@SuppressWarnings("rawtypes")
- private okhttp3.Call createConfigValidateBeforeCall(
- UUID productId, CreateConfigRequest createConfigRequest, final ApiCallback _callback)
- throws ApiException {
+ private okhttp3.Call createConfigValidateBeforeCall(UUID productId, CreateConfigRequest createConfigRequest, final ApiCallback _callback) throws ApiException {
// verify the required parameter 'productId' is set
if (productId == null) {
- throw new ApiException(
- "Missing the required parameter 'productId' when calling createConfig(Async)");
+ throw new ApiException("Missing the required parameter 'productId' when calling createConfig(Async)");
}
// verify the required parameter 'createConfigRequest' is set
if (createConfigRequest == null) {
- throw new ApiException(
- "Missing the required parameter 'createConfigRequest' when calling"
- + " createConfig(Async)");
+ throw new ApiException("Missing the required parameter 'createConfigRequest' when calling createConfig(Async)");
}
return createConfigCall(productId, createConfigRequest, _callback);
+
}
/**
- * Create Config This endpoint creates a new Config in a specified Product identified by the
- * `productId` parameter, which can be obtained from the [List
- * Products](#operation/get-products) endpoint.
- *
+ * Create Config
+ * This endpoint creates a new Config in a specified Product identified by the `productId` parameter, which can be obtained from the [List Products](#operation/get-products) endpoint.
* @param productId The identifier of the Product. (required)
- * @param createConfigRequest (required)
+ * @param createConfigRequest (required)
* @return ConfigModel
- * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the
- * response body
+ * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @http.response.details
- *
- * | Status Code | Description | Response Headers |
- * | 201 | When the creation was successful. | - |
- * | 400 | Bad request. | - |
- * | 404 | Not found. | - |
- * | 429 | Too many requests. In case of the request rate exceeds the rate limits. | - |
- *
+
+ | Status Code | Description | Response Headers |
+ | 201 | When the creation was successful. | - |
+ | 400 | Bad request. | - |
+ | 404 | Not found. | - |
+ | 429 | Too many requests. In case of the request rate exceeds the rate limits. | - |
+
*/
- public ConfigModel createConfig(UUID productId, CreateConfigRequest createConfigRequest)
- throws ApiException {
- ApiResponse localVarResp =
- createConfigWithHttpInfo(productId, createConfigRequest);
+ public ConfigModel createConfig(UUID productId, CreateConfigRequest createConfigRequest) throws ApiException {
+ ApiResponse localVarResp = createConfigWithHttpInfo(productId, createConfigRequest);
return localVarResp.getData();
}
/**
- * Create Config This endpoint creates a new Config in a specified Product identified by the
- * `productId` parameter, which can be obtained from the [List
- * Products](#operation/get-products) endpoint.
- *
+ * Create Config
+ * This endpoint creates a new Config in a specified Product identified by the `productId` parameter, which can be obtained from the [List Products](#operation/get-products) endpoint.
* @param productId The identifier of the Product. (required)
- * @param createConfigRequest (required)
+ * @param createConfigRequest (required)
* @return ApiResponse<ConfigModel>
- * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the
- * response body
+ * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @http.response.details
- *
- * | Status Code | Description | Response Headers |
- * | 201 | When the creation was successful. | - |
- * | 400 | Bad request. | - |
- * | 404 | Not found. | - |
- * | 429 | Too many requests. In case of the request rate exceeds the rate limits. | - |
- *
+
+ | Status Code | Description | Response Headers |
+ | 201 | When the creation was successful. | - |
+ | 400 | Bad request. | - |
+ | 404 | Not found. | - |
+ | 429 | Too many requests. In case of the request rate exceeds the rate limits. | - |
+
*/
- public ApiResponse createConfigWithHttpInfo(
- UUID productId, CreateConfigRequest createConfigRequest) throws ApiException {
- okhttp3.Call localVarCall =
- createConfigValidateBeforeCall(productId, createConfigRequest, null);
- Type localVarReturnType = new TypeToken() {}.getType();
+ public ApiResponse createConfigWithHttpInfo(UUID productId, CreateConfigRequest createConfigRequest) throws ApiException {
+ okhttp3.Call localVarCall = createConfigValidateBeforeCall(productId, createConfigRequest, null);
+ Type localVarReturnType = new TypeToken(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
}
/**
- * Create Config (asynchronously) This endpoint creates a new Config in a specified Product
- * identified by the `productId` parameter, which can be obtained from the [List
- * Products](#operation/get-products) endpoint.
- *
+ * Create Config (asynchronously)
+ * This endpoint creates a new Config in a specified Product identified by the `productId` parameter, which can be obtained from the [List Products](#operation/get-products) endpoint.
* @param productId The identifier of the Product. (required)
- * @param createConfigRequest (required)
+ * @param createConfigRequest (required)
* @param _callback The callback to be executed when the API call finishes
* @return The request call
- * @throws ApiException If fail to process the API call, e.g. serializing the request body
- * object
+ * @throws ApiException If fail to process the API call, e.g. serializing the request body object
* @http.response.details
- *
- * | Status Code | Description | Response Headers |
- * | 201 | When the creation was successful. | - |
- * | 400 | Bad request. | - |
- * | 404 | Not found. | - |
- * | 429 | Too many requests. In case of the request rate exceeds the rate limits. | - |
- *
+
+ | Status Code | Description | Response Headers |
+ | 201 | When the creation was successful. | - |
+ | 400 | Bad request. | - |
+ | 404 | Not found. | - |
+ | 429 | Too many requests. In case of the request rate exceeds the rate limits. | - |
+
*/
- public okhttp3.Call createConfigAsync(
- UUID productId,
- CreateConfigRequest createConfigRequest,
- final ApiCallback _callback)
- throws ApiException {
-
- okhttp3.Call localVarCall =
- createConfigValidateBeforeCall(productId, createConfigRequest, _callback);
- Type localVarReturnType = new TypeToken() {}.getType();
+ public okhttp3.Call createConfigAsync(UUID productId, CreateConfigRequest createConfigRequest, final ApiCallback _callback) throws ApiException {
+
+ okhttp3.Call localVarCall = createConfigValidateBeforeCall(productId, createConfigRequest, _callback);
+ Type localVarReturnType = new TypeToken(){}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
/**
* Build call for deleteConfig
- *
* @param configId The identifier of the Config. (required)
* @param _callback Callback for upload/download progress
* @return Call to execute
* @throws ApiException If fail to serialize the request body object
* @http.response.details
- *
- * | Status Code | Description | Response Headers |
- * | 204 | When the delete was successful. | - |
- * | 400 | Bad request. | - |
- * | 404 | Not found. | - |
- * | 429 | Too many requests. In case of the request rate exceeds the rate limits. | - |
- *
+
+ | Status Code | Description | Response Headers |
+ | 204 | When the delete was successful. | - |
+ | 400 | Bad request. | - |
+ | 404 | Not found. | - |
+ | 429 | Too many requests. In case of the request rate exceeds the rate limits. | - |
+
*/
- public okhttp3.Call deleteConfigCall(UUID configId, final ApiCallback _callback)
- throws ApiException {
+ public okhttp3.Call deleteConfigCall(UUID configId, final ApiCallback _callback) throws ApiException {
String basePath = null;
// Operation Servers
- String[] localBasePaths = new String[] {};
+ String[] localBasePaths = new String[] { };
// Determine Base Path to Use
- if (localCustomBaseUrl != null) {
+ if (localCustomBaseUrl != null){
basePath = localCustomBaseUrl;
- } else if (localBasePaths.length > 0) {
+ } else if ( localBasePaths.length > 0 ) {
basePath = localBasePaths[localHostIndex];
} else {
basePath = null;
@@ -284,11 +254,8 @@ public okhttp3.Call deleteConfigCall(UUID configId, final ApiCallback _callback)
Object localVarPostBody = null;
// create path and map variables
- String localVarPath =
- "/v1/configs/{configId}"
- .replace(
- "{" + "configId" + "}",
- localVarApiClient.escapeString(configId.toString()));
+ String localVarPath = "/v1/configs/{configId}"
+ .replace("{" + "configId" + "}", localVarApiClient.escapeString(configId.toString()));
List localVarQueryParams = new ArrayList();
List localVarCollectionQueryParams = new ArrayList();
@@ -296,82 +263,67 @@ public okhttp3.Call deleteConfigCall(UUID configId, final ApiCallback _callback)
Map localVarCookieParams = new HashMap();
Map localVarFormParams = new HashMap();
- final String[] localVarAccepts = {};
+ final String[] localVarAccepts = {
+ };
final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
if (localVarAccept != null) {
localVarHeaderParams.put("Accept", localVarAccept);
}
- final String[] localVarContentTypes = {};
- final String localVarContentType =
- localVarApiClient.selectHeaderContentType(localVarContentTypes);
+ final String[] localVarContentTypes = {
+ };
+ final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
if (localVarContentType != null) {
localVarHeaderParams.put("Content-Type", localVarContentType);
}
- String[] localVarAuthNames = new String[] {"Basic"};
- return localVarApiClient.buildCall(
- basePath,
- localVarPath,
- "DELETE",
- localVarQueryParams,
- localVarCollectionQueryParams,
- localVarPostBody,
- localVarHeaderParams,
- localVarCookieParams,
- localVarFormParams,
- localVarAuthNames,
- _callback);
+ String[] localVarAuthNames = new String[] { "Basic" };
+ return localVarApiClient.buildCall(basePath, localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
}
@SuppressWarnings("rawtypes")
- private okhttp3.Call deleteConfigValidateBeforeCall(UUID configId, final ApiCallback _callback)
- throws ApiException {
+ private okhttp3.Call deleteConfigValidateBeforeCall(UUID configId, final ApiCallback _callback) throws ApiException {
// verify the required parameter 'configId' is set
if (configId == null) {
- throw new ApiException(
- "Missing the required parameter 'configId' when calling deleteConfig(Async)");
+ throw new ApiException("Missing the required parameter 'configId' when calling deleteConfig(Async)");
}
return deleteConfigCall(configId, _callback);
+
}
/**
- * Delete Config This endpoint removes a Config identified by the `configId`
- * parameter.
- *
+ * Delete Config
+ * This endpoint removes a Config identified by the `configId` parameter.
* @param configId The identifier of the Config. (required)
- * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the
- * response body
+ * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @http.response.details
- *
- * | Status Code | Description | Response Headers |
- * | 204 | When the delete was successful. | - |
- * | 400 | Bad request. | - |
- * | 404 | Not found. | - |
- * | 429 | Too many requests. In case of the request rate exceeds the rate limits. | - |
- *
+
+ | Status Code | Description | Response Headers |
+ | 204 | When the delete was successful. | - |
+ | 400 | Bad request. | - |
+ | 404 | Not found. | - |
+ | 429 | Too many requests. In case of the request rate exceeds the rate limits. | - |
+
*/
public void deleteConfig(UUID configId) throws ApiException {
deleteConfigWithHttpInfo(configId);
}
/**
- * Delete Config This endpoint removes a Config identified by the `configId`
- * parameter.
- *
+ * Delete Config
+ * This endpoint removes a Config identified by the `configId` parameter.
* @param configId The identifier of the Config. (required)
* @return ApiResponse<Void>
- * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the
- * response body
+ * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @http.response.details
- *
- * | Status Code | Description | Response Headers |
- * | 204 | When the delete was successful. | - |
- * | 400 | Bad request. | - |
- * | 404 | Not found. | - |
- * | 429 | Too many requests. In case of the request rate exceeds the rate limits. | - |
- *
+
+ | Status Code | Description | Response Headers |
+ | 204 | When the delete was successful. | - |
+ | 400 | Bad request. | - |
+ | 404 | Not found. | - |
+ | 429 | Too many requests. In case of the request rate exceeds the rate limits. | - |
+
*/
public ApiResponse deleteConfigWithHttpInfo(UUID configId) throws ApiException {
okhttp3.Call localVarCall = deleteConfigValidateBeforeCall(configId, null);
@@ -379,25 +331,22 @@ public ApiResponse deleteConfigWithHttpInfo(UUID configId) throws ApiExcep
}
/**
- * Delete Config (asynchronously) This endpoint removes a Config identified by the
- * `configId` parameter.
- *
+ * Delete Config (asynchronously)
+ * This endpoint removes a Config identified by the `configId` parameter.
* @param configId The identifier of the Config. (required)
* @param _callback The callback to be executed when the API call finishes
* @return The request call
- * @throws ApiException If fail to process the API call, e.g. serializing the request body
- * object
+ * @throws ApiException If fail to process the API call, e.g. serializing the request body object
* @http.response.details
- *
- * | Status Code | Description | Response Headers |
- * | 204 | When the delete was successful. | - |
- * | 400 | Bad request. | - |
- * | 404 | Not found. | - |
- * | 429 | Too many requests. In case of the request rate exceeds the rate limits. | - |
- *
+
+ | Status Code | Description | Response Headers |
+ | 204 | When the delete was successful. | - |
+ | 400 | Bad request. | - |
+ | 404 | Not found. | - |
+ | 429 | Too many requests. In case of the request rate exceeds the rate limits. | - |
+
*/
- public okhttp3.Call deleteConfigAsync(UUID configId, final ApiCallback _callback)
- throws ApiException {
+ public okhttp3.Call deleteConfigAsync(UUID configId, final ApiCallback _callback) throws ApiException {
okhttp3.Call localVarCall = deleteConfigValidateBeforeCall(configId, _callback);
localVarApiClient.executeAsync(localVarCall, _callback);
@@ -405,30 +354,28 @@ public okhttp3.Call deleteConfigAsync(UUID configId, final ApiCallback _ca
}
/**
* Build call for getConfig
- *
* @param configId The identifier of the Config. (required)
* @param _callback Callback for upload/download progress
* @return Call to execute
* @throws ApiException If fail to serialize the request body object
* @http.response.details
- *
- * | Status Code | Description | Response Headers |
- * | 200 | When everything is ok, the config data returned. | - |
- * | 400 | Bad request. | - |
- * | 404 | Not found. | - |
- * | 429 | Too many requests. In case of the request rate exceeds the rate limits. | - |
- *
+
+ | Status Code | Description | Response Headers |
+ | 200 | When everything is ok, the config data returned. | - |
+ | 400 | Bad request. | - |
+ | 404 | Not found. | - |
+ | 429 | Too many requests. In case of the request rate exceeds the rate limits. | - |
+
*/
- public okhttp3.Call getConfigCall(UUID configId, final ApiCallback _callback)
- throws ApiException {
+ public okhttp3.Call getConfigCall(UUID configId, final ApiCallback _callback) throws ApiException {
String basePath = null;
// Operation Servers
- String[] localBasePaths = new String[] {};
+ String[] localBasePaths = new String[] { };
// Determine Base Path to Use
- if (localCustomBaseUrl != null) {
+ if (localCustomBaseUrl != null){
basePath = localCustomBaseUrl;
- } else if (localBasePaths.length > 0) {
+ } else if ( localBasePaths.length > 0 ) {
basePath = localBasePaths[localHostIndex];
} else {
basePath = null;
@@ -437,11 +384,8 @@ public okhttp3.Call getConfigCall(UUID configId, final ApiCallback _callback)
Object localVarPostBody = null;
// create path and map variables
- String localVarPath =
- "/v1/configs/{configId}"
- .replace(
- "{" + "configId" + "}",
- localVarApiClient.escapeString(configId.toString()));
+ String localVarPath = "/v1/configs/{configId}"
+ .replace("{" + "configId" + "}", localVarApiClient.escapeString(configId.toString()));
List localVarQueryParams = new ArrayList();
List localVarCollectionQueryParams = new ArrayList();
@@ -449,62 +393,50 @@ public okhttp3.Call getConfigCall(UUID configId, final ApiCallback _callback)
Map localVarCookieParams = new HashMap();
Map localVarFormParams = new HashMap();
- final String[] localVarAccepts = {"application/json"};
+ final String[] localVarAccepts = {
+ "application/json"
+ };
final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
if (localVarAccept != null) {
localVarHeaderParams.put("Accept", localVarAccept);
}
- final String[] localVarContentTypes = {};
- final String localVarContentType =
- localVarApiClient.selectHeaderContentType(localVarContentTypes);
+ final String[] localVarContentTypes = {
+ };
+ final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
if (localVarContentType != null) {
localVarHeaderParams.put("Content-Type", localVarContentType);
}
- String[] localVarAuthNames = new String[] {"Basic"};
- return localVarApiClient.buildCall(
- basePath,
- localVarPath,
- "GET",
- localVarQueryParams,
- localVarCollectionQueryParams,
- localVarPostBody,
- localVarHeaderParams,
- localVarCookieParams,
- localVarFormParams,
- localVarAuthNames,
- _callback);
+ String[] localVarAuthNames = new String[] { "Basic" };
+ return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
}
@SuppressWarnings("rawtypes")
- private okhttp3.Call getConfigValidateBeforeCall(UUID configId, final ApiCallback _callback)
- throws ApiException {
+ private okhttp3.Call getConfigValidateBeforeCall(UUID configId, final ApiCallback _callback) throws ApiException {
// verify the required parameter 'configId' is set
if (configId == null) {
- throw new ApiException(
- "Missing the required parameter 'configId' when calling getConfig(Async)");
+ throw new ApiException("Missing the required parameter 'configId' when calling getConfig(Async)");
}
return getConfigCall(configId, _callback);
+
}
/**
- * Get Config This endpoint returns the metadata of a Config identified by the
- * `configId`.
- *
+ * Get Config
+ * This endpoint returns the metadata of a Config identified by the `configId`.
* @param configId The identifier of the Config. (required)
* @return ConfigModel
- * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the
- * response body
+ * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @http.response.details
- *
- * | Status Code | Description | Response Headers |
- * | 200 | When everything is ok, the config data returned. | - |
- * | 400 | Bad request. | - |
- * | 404 | Not found. | - |
- * | 429 | Too many requests. In case of the request rate exceeds the rate limits. | - |
- *
+
+ | Status Code | Description | Response Headers |
+ | 200 | When everything is ok, the config data returned. | - |
+ | 400 | Bad request. | - |
+ | 404 | Not found. | - |
+ | 429 | Too many requests. In case of the request rate exceeds the rate limits. | - |
+
*/
public ConfigModel getConfig(UUID configId) throws ApiException {
ApiResponse localVarResp = getConfigWithHttpInfo(configId);
@@ -512,80 +444,73 @@ public ConfigModel getConfig(UUID configId) throws ApiException {
}
/**
- * Get Config This endpoint returns the metadata of a Config identified by the
- * `configId`.
- *
+ * Get Config
+ * This endpoint returns the metadata of a Config identified by the `configId`.
* @param configId The identifier of the Config. (required)
* @return ApiResponse<ConfigModel>
- * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the
- * response body
+ * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @http.response.details
- *
- * | Status Code | Description | Response Headers |
- * | 200 | When everything is ok, the config data returned. | - |
- * | 400 | Bad request. | - |
- * | 404 | Not found. | - |
- * | 429 | Too many requests. In case of the request rate exceeds the rate limits. | - |
- *
+
+ | Status Code | Description | Response Headers |
+ | 200 | When everything is ok, the config data returned. | - |
+ | 400 | Bad request. | - |
+ | 404 | Not found. | - |
+ | 429 | Too many requests. In case of the request rate exceeds the rate limits. | - |
+
*/
public ApiResponse getConfigWithHttpInfo(UUID configId) throws ApiException {
okhttp3.Call localVarCall = getConfigValidateBeforeCall(configId, null);
- Type localVarReturnType = new TypeToken() {}.getType();
+ Type localVarReturnType = new TypeToken(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
}
/**
- * Get Config (asynchronously) This endpoint returns the metadata of a Config identified by the
- * `configId`.
- *
+ * Get Config (asynchronously)
+ * This endpoint returns the metadata of a Config identified by the `configId`.
* @param configId The identifier of the Config. (required)
* @param _callback The callback to be executed when the API call finishes
* @return The request call
- * @throws ApiException If fail to process the API call, e.g. serializing the request body
- * object
+ * @throws ApiException If fail to process the API call, e.g. serializing the request body object
* @http.response.details
- *
- * | Status Code | Description | Response Headers |
- * | 200 | When everything is ok, the config data returned. | - |
- * | 400 | Bad request. | - |
- * | 404 | Not found. | - |
- * | 429 | Too many requests. In case of the request rate exceeds the rate limits. | - |
- *
+
+ | Status Code | Description | Response Headers |
+ | 200 | When everything is ok, the config data returned. | - |
+ | 400 | Bad request. | - |
+ | 404 | Not found. | - |
+ | 429 | Too many requests. In case of the request rate exceeds the rate limits. | - |
+
*/
- public okhttp3.Call getConfigAsync(UUID configId, final ApiCallback _callback)
- throws ApiException {
+ public okhttp3.Call getConfigAsync(UUID configId, final ApiCallback _callback) throws ApiException {
okhttp3.Call localVarCall = getConfigValidateBeforeCall(configId, _callback);
- Type localVarReturnType = new TypeToken() {}.getType();
+ Type localVarReturnType = new TypeToken(){}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
/**
* Build call for getConfigs
- *
* @param productId The identifier of the Product. (required)
* @param _callback Callback for upload/download progress
* @return Call to execute
* @throws ApiException If fail to serialize the request body object
* @http.response.details
- *
- * | Status Code | Description | Response Headers |
- * | 200 | | - |
- * | 400 | Bad request. | - |
- * | 404 | Not found. | - |
- * | 429 | Too many requests. In case of the request rate exceeds the rate limits. | - |
- *
+
+ | Status Code | Description | Response Headers |
+ | 200 | | - |
+ | 400 | Bad request. | - |
+ | 404 | Not found. | - |
+ | 429 | Too many requests. In case of the request rate exceeds the rate limits. | - |
+
*/
- public okhttp3.Call getConfigsCall(UUID productId, final ApiCallback _callback)
- throws ApiException {
+ public okhttp3.Call getConfigsCall(UUID productId, final ApiCallback _callback) throws ApiException {
String basePath = null;
// Operation Servers
- String[] localBasePaths = new String[] {};
+ String[] localBasePaths = new String[] { };
// Determine Base Path to Use
- if (localCustomBaseUrl != null) {
+ if (localCustomBaseUrl != null){
basePath = localCustomBaseUrl;
- } else if (localBasePaths.length > 0) {
+ } else if ( localBasePaths.length > 0 ) {
basePath = localBasePaths[localHostIndex];
} else {
basePath = null;
@@ -594,11 +519,8 @@ public okhttp3.Call getConfigsCall(UUID productId, final ApiCallback _callback)
Object localVarPostBody = null;
// create path and map variables
- String localVarPath =
- "/v1/products/{productId}/configs"
- .replace(
- "{" + "productId" + "}",
- localVarApiClient.escapeString(productId.toString()));
+ String localVarPath = "/v1/products/{productId}/configs"
+ .replace("{" + "productId" + "}", localVarApiClient.escapeString(productId.toString()));
List localVarQueryParams = new ArrayList();
List localVarCollectionQueryParams = new ArrayList();
@@ -606,63 +528,50 @@ public okhttp3.Call getConfigsCall(UUID productId, final ApiCallback _callback)
Map localVarCookieParams = new HashMap();
Map localVarFormParams = new HashMap();
- final String[] localVarAccepts = {"application/json"};
+ final String[] localVarAccepts = {
+ "application/json"
+ };
final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
if (localVarAccept != null) {
localVarHeaderParams.put("Accept", localVarAccept);
}
- final String[] localVarContentTypes = {};
- final String localVarContentType =
- localVarApiClient.selectHeaderContentType(localVarContentTypes);
+ final String[] localVarContentTypes = {
+ };
+ final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
if (localVarContentType != null) {
localVarHeaderParams.put("Content-Type", localVarContentType);
}
- String[] localVarAuthNames = new String[] {"Basic"};
- return localVarApiClient.buildCall(
- basePath,
- localVarPath,
- "GET",
- localVarQueryParams,
- localVarCollectionQueryParams,
- localVarPostBody,
- localVarHeaderParams,
- localVarCookieParams,
- localVarFormParams,
- localVarAuthNames,
- _callback);
+ String[] localVarAuthNames = new String[] { "Basic" };
+ return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
}
@SuppressWarnings("rawtypes")
- private okhttp3.Call getConfigsValidateBeforeCall(UUID productId, final ApiCallback _callback)
- throws ApiException {
+ private okhttp3.Call getConfigsValidateBeforeCall(UUID productId, final ApiCallback _callback) throws ApiException {
// verify the required parameter 'productId' is set
if (productId == null) {
- throw new ApiException(
- "Missing the required parameter 'productId' when calling getConfigs(Async)");
+ throw new ApiException("Missing the required parameter 'productId' when calling getConfigs(Async)");
}
return getConfigsCall(productId, _callback);
+
}
/**
- * List Configs This endpoint returns the list of the Configs that belongs to the given Product
- * identified by the `productId` parameter, which can be obtained from the [List
- * Products](#operation/get-products) endpoint.
- *
+ * List Configs
+ * This endpoint returns the list of the Configs that belongs to the given Product identified by the `productId` parameter, which can be obtained from the [List Products](#operation/get-products) endpoint.
* @param productId The identifier of the Product. (required)
* @return List<ConfigModel>
- * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the
- * response body
+ * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @http.response.details
- *
- * | Status Code | Description | Response Headers |
- * | 200 | | - |
- * | 400 | Bad request. | - |
- * | 404 | Not found. | - |
- * | 429 | Too many requests. In case of the request rate exceeds the rate limits. | - |
- *
+
+ | Status Code | Description | Response Headers |
+ | 200 | | - |
+ | 400 | Bad request. | - |
+ | 404 | Not found. | - |
+ | 429 | Too many requests. In case of the request rate exceeds the rate limits. | - |
+
*/
public List getConfigs(UUID productId) throws ApiException {
ApiResponse> localVarResp = getConfigsWithHttpInfo(productId);
@@ -670,85 +579,74 @@ public List getConfigs(UUID productId) throws ApiException {
}
/**
- * List Configs This endpoint returns the list of the Configs that belongs to the given Product
- * identified by the `productId` parameter, which can be obtained from the [List
- * Products](#operation/get-products) endpoint.
- *
+ * List Configs
+ * This endpoint returns the list of the Configs that belongs to the given Product identified by the `productId` parameter, which can be obtained from the [List Products](#operation/get-products) endpoint.
* @param productId The identifier of the Product. (required)
* @return ApiResponse<List<ConfigModel>>
- * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the
- * response body
+ * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @http.response.details
- *