interceptors) {
OkHttpClient.Builder builder = new OkHttpClient.Builder();
builder.addNetworkInterceptor(getProgressInterceptor());
- for (Interceptor interceptor: interceptors) {
+ for (Interceptor interceptor : interceptors) {
builder.addInterceptor(interceptor);
}
@@ -245,9 +236,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
@@ -268,8 +259,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
@@ -281,7 +272,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
*/
@@ -290,8 +281,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
@@ -303,7 +294,7 @@ public ApiClient setKeyManagers(KeyManager[] managers) {
}
/**
- * Getter for the field dateFormat.
+ * Getter for the field dateFormat.
*
* @return a {@link java.text.DateFormat} object
*/
@@ -312,7 +303,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
@@ -323,7 +314,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
@@ -334,7 +325,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
@@ -345,7 +336,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
@@ -356,7 +347,7 @@ public ApiClient setLocalDateFormat(DateTimeFormatter dateFormat) {
}
/**
- * Set LenientOnJson.
+ * Set LenientOnJson.
*
* @param lenientOnJson a boolean
* @return a {@link com.configcat.publicapi.java.client.ApiClient} object
@@ -385,7 +376,6 @@ public Authentication getAuthentication(String authName) {
return authentications.get(authName);
}
-
/**
* Helper method to set username for the first HTTP basic authentication.
*
@@ -463,7 +453,8 @@ 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!");
}
@@ -476,7 +467,12 @@ public void setAWS4Configuration(String accessKey, String secretKey, String regi
* @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!");
}
@@ -548,11 +544,12 @@ 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() {
@@ -580,15 +577,18 @@ 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,19 +624,18 @@ 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.
*
@@ -646,8 +645,10 @@ 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) {
@@ -667,7 +668,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.
@@ -688,7 +689,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.
@@ -760,7 +761,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));
@@ -770,8 +771,7 @@ 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,13 +781,10 @@ 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.
*/
@@ -797,13 +794,12 @@ 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) {
@@ -818,13 +814,12 @@ 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) {
@@ -859,15 +854,16 @@ 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 {
@@ -889,10 +885,8 @@ 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);
}
@@ -921,13 +915,14 @@ 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[]) {
@@ -957,7 +952,8 @@ 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 {
@@ -1005,14 +1001,11 @@ 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();
}
/**
@@ -1033,9 +1026,8 @@ 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 {
@@ -1070,27 +1062,32 @@ 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());
+ }
+ });
}
/**
@@ -1100,8 +1097,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()) {
@@ -1112,7 +1109,11 @@ 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;
@@ -1125,10 +1126,15 @@ 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);
}
}
@@ -1137,7 +1143,8 @@ 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
@@ -1147,10 +1154,35 @@ 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);
}
@@ -1160,7 +1192,8 @@ public Call buildCall(String baseUrl, String path, String method, List que
*
* @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
@@ -1170,9 +1203,22 @@ public Call buildCall(String baseUrl, String path, String method, List que
* @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);
@@ -1198,14 +1244,23 @@ public Request buildRequest(String baseUrl, String path, String method, 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);
@@ -1244,9 +1300,11 @@ public String buildUrl(String baseUrl, String path, List queryParams, List
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 {
@@ -1267,7 +1325,9 @@ public String buildUrl(String baseUrl, String path, List queryParams, List
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));
}
}
}
@@ -1317,11 +1377,13 @@ 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()));
}
}
}
@@ -1338,8 +1400,15 @@ 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) {
@@ -1364,8 +1433,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
@@ -1378,7 +1447,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 {
@@ -1410,24 +1479,29 @@ 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"));
@@ -1446,8 +1520,8 @@ private void addPartToMultiPartBuilder(MultipartBody.Builder mpBuilder, String k
}
/**
- * 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() {
@@ -1457,9 +1531,10 @@ 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;
}
@@ -1467,47 +1542,54 @@ 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 {
+ 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[] {};
+ }
}
-
- @Override
- public void checkServerTrusted(java.security.cert.X509Certificate[] chain, String authType) throws CertificateException {
- }
-
+ };
+ hostnameVerifier =
+ new HostnameVerifier() {
@Override
- public java.security.cert.X509Certificate[] getAcceptedIssuers() {
- return new java.security.cert.X509Certificate[]{};
+ public boolean verify(String hostname, SSLSession session) {
+ return true;
}
- }
- };
- 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;
@@ -1523,8 +1605,12 @@ 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) {
@@ -1547,7 +1633,8 @@ 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 190caea..4b7b478 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;
-import java.util.Map;
-import java.util.List;
+import java.util.List;
+import java.util.Map;
-/**
- * ApiException class.
- */
+/** ApiException class. */
@SuppressWarnings("serial")
-@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-10T12:39:37.024419310Z[Etc/UTC]", comments = "Generator version: 7.7.0")
+@javax.annotation.Generated(
+ value = "org.openapitools.codegen.languages.JavaClientCodegen",
+ date = "2024-10-09T12:38:06.739118192Z[Etc/UTC]",
+ comments = "Generator version: 7.7.0")
public class ApiException extends RuntimeException {
private static final long serialVersionUID = 1L;
@@ -29,13 +29,11 @@ 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
*/
@@ -44,7 +42,7 @@ public ApiException(Throwable throwable) {
}
/**
- * Constructor for ApiException.
+ * Constructor for ApiException.
*
* @param message the error message
*/
@@ -53,7 +51,7 @@ public ApiException(String message) {
}
/**
- * Constructor for ApiException.
+ * Constructor for ApiException.
*
* @param message the error message
* @param throwable a {@link java.lang.Throwable} object
@@ -61,7 +59,12 @@ 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;
@@ -69,42 +72,55 @@ public ApiException(String message, Throwable throwable, int code, MapConstructor 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
@@ -115,14 +131,18 @@ 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;
@@ -161,7 +181,12 @@ 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 47d753e..3044d2e 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,22 +10,20 @@
* Do not edit the class manually.
*/
-
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 {
- final private int statusCode;
- final private Map> headers;
- final private T data;
+ private final int statusCode;
+ private final Map> headers;
+ private final T data;
/**
- * Constructor for ApiResponse.
+ * Constructor for ApiResponse.
*
* @param statusCode The status code of HTTP response
* @param headers The headers of HTTP response
@@ -35,7 +33,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
@@ -48,7 +46,7 @@ public ApiResponse(int statusCode, Map> headers, T data) {
}
/**
- * Get the status code.
+ * Get the status code.
*
* @return the status code
*/
@@ -57,16 +55,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 6b27312..aacf3a5 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,18 +10,20 @@
* Do not edit the class manually.
*/
-
package com.configcat.publicapi.java.client;
-@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-10T12:39:37.024419310Z[Etc/UTC]", comments = "Generator version: 7.7.0")
+@javax.annotation.Generated(
+ value = "org.openapitools.codegen.languages.JavaClientCodegen",
+ date = "2024-10-09T12:38:06.739118192Z[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
*/
@@ -30,8 +32,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 1d17be4..8364f64 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,21 +10,20 @@
* Do not edit the class manually.
*/
-
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
@@ -34,10 +33,14 @@ 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 3892933..f16bf59 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,22 +10,18 @@
* Do not edit the class manually.
*/
-
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;
@@ -36,9 +32,8 @@
import java.time.OffsetDateTime;
import java.time.format.DateTimeFormatter;
import java.util.Date;
-import java.util.Locale;
import java.util.Map;
-import java.util.HashMap;
+import okio.ByteString;
/*
* A JSON utility class
@@ -51,37 +46,42 @@ 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,101 +93,288 @@ private static Class getClassByDiscriminator(Map classByDiscriminatorValue, Stri
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();
}
@@ -226,8 +413,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
*/
@@ -236,7 +423,8 @@ 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 {
@@ -253,9 +441,7 @@ 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
@@ -281,9 +467,7 @@ 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;
@@ -318,16 +502,14 @@ 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;
@@ -375,9 +557,8 @@ 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 {
@@ -420,7 +601,8 @@ 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);
}
@@ -429,8 +611,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 88336a3..fda1580 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,15 +10,17 @@
* Do not edit the class manually.
*/
-
package com.configcat.publicapi.java.client;
-@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-10T12:39:37.024419310Z[Etc/UTC]", comments = "Generator version: 7.7.0")
+@javax.annotation.Generated(
+ value = "org.openapitools.codegen.languages.JavaClientCodegen",
+ date = "2024-10-09T12:38:06.739118192Z[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 fa0316d..13d182d 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,14 +10,12 @@
* Do not edit the class manually.
*/
-
package com.configcat.publicapi.java.client;
-import okhttp3.MediaType;
-import okhttp3.RequestBody;
import java.io.IOException;
-
+import okhttp3.MediaType;
+import okhttp3.RequestBody;
import okio.Buffer;
import okio.BufferedSink;
import okio.ForwardingSink;
@@ -66,7 +64,8 @@ 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 6fb85b3..8a45337 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,14 +10,12 @@
* Do not edit the class manually.
*/
-
package com.configcat.publicapi.java.client;
-import okhttp3.MediaType;
-import okhttp3.ResponseBody;
import java.io.IOException;
-
+import okhttp3.MediaType;
+import okhttp3.ResponseBody;
import okio.Buffer;
import okio.BufferedSource;
import okio.ForwardingSource;
@@ -62,7 +60,8 @@ 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 baf57c4..a039961 100644
--- a/src/main/java/com/configcat/publicapi/java/client/ServerConfiguration.java
+++ b/src/main/java/com/configcat/publicapi/java/client/ServerConfiguration.java
@@ -1,11 +1,13 @@
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-09-10T12:39:37.024419310Z[Etc/UTC]", comments = "Generator version: 7.7.0")
+/** 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")
public class ServerConfiguration {
public String URL;
public String description;
@@ -14,9 +16,11 @@ 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;
@@ -32,15 +36,21 @@ 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 1b21a4c..a878bf2 100644
--- a/src/main/java/com/configcat/publicapi/java/client/ServerVariable.java
+++ b/src/main/java/com/configcat/publicapi/java/client/ServerVariable.java
@@ -1,11 +1,13 @@
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-09-10T12:39:37.024419310Z[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 = "2024-10-09T12:38:06.739118192Z[Etc/UTC]",
+ comments = "Generator version: 7.7.0")
public class ServerVariable {
public String description;
public String defaultValue;
@@ -14,7 +16,8 @@ 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 fdf17dc..e2e7861 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,74 +10,76 @@
* Do not edit the class manually.
*/
-
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-09-10T12:39:37.024419310Z[Etc/UTC]", comments = "Generator version: 7.7.0")
+@javax.annotation.Generated(
+ value = "org.openapitools.codegen.languages.JavaClientCodegen",
+ date = "2024-10-09T12:38:06.739118192Z[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;
- }
+ /**
+ * 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;
}
- 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]);
+ StringBuilder out = new StringBuilder();
+ out.append(array[0]);
+ for (int i = 1; i < len; i++) {
+ out.append(separator).append(array[i]);
+ }
+ return out.toString();
}
- 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());
+ /**
+ * 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();
}
- 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 a87ce22..8cfb707 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,33 +10,26 @@
* Do not edit the class manually.
*/
-
package com.configcat.publicapi.java.client.api;
+
import com.configcat.publicapi.java.client.ApiCallback;
import com.configcat.publicapi.java.client.ApiClient;
import com.configcat.publicapi.java.client.ApiException;
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 java.time.OffsetDateTime;
+import com.configcat.publicapi.java.client.model.AuditLogType;
import com.configcat.publicapi.java.client.model.SettingModel;
-import java.util.UUID;
-
+import com.google.gson.reflect.TypeToken;
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;
@@ -77,6 +70,7 @@ 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)
@@ -87,23 +81,31 @@ 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, String 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;
@@ -112,8 +114,11 @@ public okhttp3.Call getAuditlogsCall(UUID productId, UUID configId, UUID environ
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();
@@ -126,54 +131,83 @@ public okhttp3.Call getAuditlogsCall(UUID productId, UUID configId, UUID environ
}
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, String 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)
@@ -181,24 +215,40 @@ private okhttp3.Call getAuditlogsValidateBeforeCall(UUID productId, UUID configI
* @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, String 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)
@@ -206,25 +256,43 @@ public List getAuditlogs(UUID productId, UUID configId, UUID
* @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, String 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)
@@ -233,47 +301,66 @@ public ApiResponse> getAuditlogsWithHttpInfo(UUID produc
* @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, String 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;
@@ -282,8 +369,11 @@ 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();
@@ -291,50 +381,63 @@ 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);
@@ -342,51 +445,58 @@ 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)
@@ -398,23 +508,32 @@ public okhttp3.Call getDeletedSettingsAsync(UUID configId, final ApiCallback
- | 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, String 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;
@@ -423,8 +542,11 @@ public okhttp3.Call getOrganizationAuditlogsCall(UUID organizationId, UUID produ
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();
@@ -441,54 +563,87 @@ public okhttp3.Call getOrganizationAuditlogsCall(UUID organizationId, UUID produ
}
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, String 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)
@@ -497,24 +652,43 @@ private okhttp3.Call getOrganizationAuditlogsValidateBeforeCall(UUID organizatio
* @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, String 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)
@@ -523,25 +697,45 @@ public List getOrganizationAuditlogs(UUID organizationId, UUI
* @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, String 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)
@@ -551,20 +745,39 @@ 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, String 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 22e4524..b477637 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,27 +10,19 @@
* Do not edit the class manually.
*/
-
package com.configcat.publicapi.java.client.api;
+
import com.configcat.publicapi.java.client.ApiCallback;
import com.configcat.publicapi.java.client.ApiClient;
import com.configcat.publicapi.java.client.ApiException;
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;
@@ -76,28 +68,32 @@ 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;
@@ -114,122 +110,150 @@ public okhttp3.Call v1CodeReferencesDeleteReportsPostCall(DeleteRepositoryReport
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;
@@ -246,122 +270,145 @@ public okhttp3.Call v1CodeReferencesPostCall(CodeReferenceRequest codeReferenceR
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;
@@ -370,8 +417,11 @@ public okhttp3.Call v1SettingsSettingIdCodeReferencesGetCall(Integer settingId,
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();
@@ -379,97 +429,118 @@ public okhttp3.Call v1SettingsSettingIdCodeReferencesGetCall(Integer settingId,
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 d664bcb..64a1e4a 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,33 +10,25 @@
* Do not edit the class manually.
*/
-
package com.configcat.publicapi.java.client.api;
+
import com.configcat.publicapi.java.client.ApiCallback;
import com.configcat.publicapi.java.client.ApiClient;
import com.configcat.publicapi.java.client.ApiException;
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;
@@ -77,29 +69,32 @@ 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;
@@ -108,8 +103,11 @@ public okhttp3.Call createConfigCall(UUID productId, CreateConfigRequest createC
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();
@@ -117,135 +115,167 @@ public okhttp3.Call createConfigCall(UUID productId, CreateConfigRequest createC
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;
@@ -254,8 +284,11 @@ 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();
@@ -263,67 +296,82 @@ 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);
@@ -331,22 +379,25 @@ 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);
@@ -354,28 +405,30 @@ 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;
@@ -384,8 +437,11 @@ public okhttp3.Call getConfigCall(UUID configId, final ApiCallback _callback) th
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();
@@ -393,50 +449,62 @@ public okhttp3.Call getConfigCall(UUID configId, final ApiCallback _callback) th
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);
@@ -444,73 +512,80 @@ 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;
@@ -519,8 +594,11 @@ 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();
@@ -528,50 +606,63 @@ 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);
@@ -579,74 +670,85 @@ 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
-
- | 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> getConfigsWithHttpInfo(UUID productId) throws ApiException {
+ public ApiResponse> getConfigsWithHttpInfo(UUID productId)
+ throws ApiException {
okhttp3.Call localVarCall = getConfigsValidateBeforeCall(productId, null);
- Type localVarReturnType = new TypeToken>(){}.getType();
+ Type localVarReturnType = new TypeToken>() {}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
}
/**
- * List Configs (asynchronously)
- * 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 (asynchronously) 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)
* @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 getConfigsAsync(UUID productId, final ApiCallback> _callback) throws ApiException {
+ public okhttp3.Call getConfigsAsync(
+ UUID productId, final ApiCallback> _callback) throws ApiException {
okhttp3.Call localVarCall = getConfigsValidateBeforeCall(productId, _callback);
- Type localVarReturnType = new TypeToken>(){}.getType();
+ Type localVarReturnType = new TypeToken>() {}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
/**
* Build call for updateConfig
+ *
* @param configId The identifier of the Config. (required)
- * @param updateConfigRequest (required)
+ * @param updateConfigRequest (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 updateConfigCall(UUID configId, UpdateConfigRequest updateConfigRequest, final ApiCallback _callback) throws ApiException {
+ public okhttp3.Call updateConfigCall(
+ UUID configId, UpdateConfigRequest updateConfigRequest, 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;
@@ -655,8 +757,11 @@ public okhttp3.Call updateConfigCall(UUID configId, UpdateConfigRequest updateCo
Object localVarPostBody = updateConfigRequest;
// 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();
@@ -664,108 +769,135 @@ public okhttp3.Call updateConfigCall(UUID configId, UpdateConfigRequest updateCo
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, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
+ String[] localVarAuthNames = new String[] {"Basic"};
+ return localVarApiClient.buildCall(
+ basePath,
+ localVarPath,
+ "PUT",
+ localVarQueryParams,
+ localVarCollectionQueryParams,
+ localVarPostBody,
+ localVarHeaderParams,
+ localVarCookieParams,
+ localVarFormParams,
+ localVarAuthNames,
+ _callback);
}
@SuppressWarnings("rawtypes")
- private okhttp3.Call updateConfigValidateBeforeCall(UUID configId, UpdateConfigRequest updateConfigRequest, final ApiCallback _callback) throws ApiException {
+ private okhttp3.Call updateConfigValidateBeforeCall(
+ UUID configId, UpdateConfigRequest updateConfigRequest, 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 updateConfig(Async)");
+ throw new ApiException(
+ "Missing the required parameter 'configId' when calling updateConfig(Async)");
}
// verify the required parameter 'updateConfigRequest' is set
if (updateConfigRequest == null) {
- throw new ApiException("Missing the required parameter 'updateConfigRequest' when calling updateConfig(Async)");
+ throw new ApiException(
+ "Missing the required parameter 'updateConfigRequest' when calling"
+ + " updateConfig(Async)");
}
return updateConfigCall(configId, updateConfigRequest, _callback);
-
}
/**
- * Update Config
- * This endpoint updates a Config identified by the `configId` parameter.
+ * Update Config This endpoint updates a Config identified by the `configId`
+ * parameter.
+ *
* @param configId The identifier of the Config. (required)
- * @param updateConfigRequest (required)
+ * @param updateConfigRequest (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 | | - |
- | 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 ConfigModel updateConfig(UUID configId, UpdateConfigRequest updateConfigRequest) throws ApiException {
- ApiResponse localVarResp = updateConfigWithHttpInfo(configId, updateConfigRequest);
+ public ConfigModel updateConfig(UUID configId, UpdateConfigRequest updateConfigRequest)
+ throws ApiException {
+ ApiResponse localVarResp =
+ updateConfigWithHttpInfo(configId, updateConfigRequest);
return localVarResp.getData();
}
/**
- * Update Config
- * This endpoint updates a Config identified by the `configId` parameter.
+ * Update Config This endpoint updates a Config identified by the `configId`
+ * parameter.
+ *
* @param configId The identifier of the Config. (required)
- * @param updateConfigRequest (required)
+ * @param updateConfigRequest (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 | | - |
- | 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 updateConfigWithHttpInfo(UUID configId, UpdateConfigRequest updateConfigRequest) throws ApiException {
- okhttp3.Call localVarCall = updateConfigValidateBeforeCall(configId, updateConfigRequest, null);
- Type localVarReturnType = new TypeToken(){}.getType();
+ public ApiResponse updateConfigWithHttpInfo(
+ UUID configId, UpdateConfigRequest updateConfigRequest) throws ApiException {
+ okhttp3.Call localVarCall =
+ updateConfigValidateBeforeCall(configId, updateConfigRequest, null);
+ Type localVarReturnType = new TypeToken() {}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
}
/**
- * Update Config (asynchronously)
- * This endpoint updates a Config identified by the `configId` parameter.
+ * Update Config (asynchronously) This endpoint updates a Config identified by the
+ * `configId` parameter.
+ *
* @param configId The identifier of the Config. (required)
- * @param updateConfigRequest (required)
+ * @param updateConfigRequest (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 updateConfigAsync(UUID configId, UpdateConfigRequest updateConfigRequest, final ApiCallback _callback) throws ApiException {
-
- okhttp3.Call localVarCall = updateConfigValidateBeforeCall(configId, updateConfigRequest, _callback);
- Type localVarReturnType = new TypeToken(){}.getType();
+ public okhttp3.Call updateConfigAsync(
+ UUID configId,
+ UpdateConfigRequest updateConfigRequest,
+ final ApiCallback _callback)
+ throws ApiException {
+
+ okhttp3.Call localVarCall =
+ updateConfigValidateBeforeCall(configId, updateConfigRequest, _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/EnvironmentsApi.java b/src/main/java/com/configcat/publicapi/java/client/api/EnvironmentsApi.java
index 0ef5b52..184ddc1 100644
--- a/src/main/java/com/configcat/publicapi/java/client/api/EnvironmentsApi.java
+++ b/src/main/java/com/configcat/publicapi/java/client/api/EnvironmentsApi.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,33 +10,25 @@
* Do not edit the class manually.
*/
-
package com.configcat.publicapi.java.client.api;
+
import com.configcat.publicapi.java.client.ApiCallback;
import com.configcat.publicapi.java.client.ApiClient;
import com.configcat.publicapi.java.client.ApiException;
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.CreateEnvironmentModel;
import com.configcat.publicapi.java.client.model.EnvironmentModel;
-import java.util.UUID;
import com.configcat.publicapi.java.client.model.UpdateEnvironmentModel;
-
+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 EnvironmentsApi {
private ApiClient localVarApiClient;
@@ -77,29 +69,34 @@ public void setCustomBaseUrl(String customBaseUrl) {
/**
* Build call for createEnvironment
+ *
* @param productId The identifier of the Product. (required)
- * @param createEnvironmentModel (required)
+ * @param createEnvironmentModel (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 createEnvironmentCall(UUID productId, CreateEnvironmentModel createEnvironmentModel, final ApiCallback _callback) throws ApiException {
+ public okhttp3.Call createEnvironmentCall(
+ UUID productId,
+ CreateEnvironmentModel createEnvironmentModel,
+ 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;
@@ -108,8 +105,11 @@ public okhttp3.Call createEnvironmentCall(UUID productId, CreateEnvironmentModel
Object localVarPostBody = createEnvironmentModel;
// create path and map variables
- String localVarPath = "/v1/products/{productId}/environments"
- .replace("{" + "productId" + "}", localVarApiClient.escapeString(productId.toString()));
+ String localVarPath =
+ "/v1/products/{productId}/environments"
+ .replace(
+ "{" + "productId" + "}",
+ localVarApiClient.escapeString(productId.toString()));
List localVarQueryParams = new ArrayList();
List localVarCollectionQueryParams = new ArrayList();
@@ -117,136 +117,173 @@ public okhttp3.Call createEnvironmentCall(UUID productId, CreateEnvironmentModel
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 createEnvironmentValidateBeforeCall(UUID productId, CreateEnvironmentModel createEnvironmentModel, final ApiCallback _callback) throws ApiException {
+ private okhttp3.Call createEnvironmentValidateBeforeCall(
+ UUID productId,
+ CreateEnvironmentModel createEnvironmentModel,
+ 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 createEnvironment(Async)");
+ throw new ApiException(
+ "Missing the required parameter 'productId' when calling"
+ + " createEnvironment(Async)");
}
// verify the required parameter 'createEnvironmentModel' is set
if (createEnvironmentModel == null) {
- throw new ApiException("Missing the required parameter 'createEnvironmentModel' when calling createEnvironment(Async)");
+ throw new ApiException(
+ "Missing the required parameter 'createEnvironmentModel' when calling"
+ + " createEnvironment(Async)");
}
return createEnvironmentCall(productId, createEnvironmentModel, _callback);
-
}
/**
- * Create Environment
- * This endpoint creates a new Environment in a specified Product identified by the `productId` parameter, which can be obtained from the [List Products](#operation/get-products) endpoint.
+ * Create Environment This endpoint creates a new Environment 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 createEnvironmentModel (required)
+ * @param createEnvironmentModel (required)
* @return EnvironmentModel
- * @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 EnvironmentModel createEnvironment(UUID productId, CreateEnvironmentModel createEnvironmentModel) throws ApiException {
- ApiResponse localVarResp = createEnvironmentWithHttpInfo(productId, createEnvironmentModel);
+ public EnvironmentModel createEnvironment(
+ UUID productId, CreateEnvironmentModel createEnvironmentModel) throws ApiException {
+ ApiResponse localVarResp =
+ createEnvironmentWithHttpInfo(productId, createEnvironmentModel);
return localVarResp.getData();
}
/**
- * Create Environment
- * This endpoint creates a new Environment in a specified Product identified by the `productId` parameter, which can be obtained from the [List Products](#operation/get-products) endpoint.
+ * Create Environment This endpoint creates a new Environment 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 createEnvironmentModel (required)
+ * @param createEnvironmentModel (required)
* @return ApiResponse<EnvironmentModel>
- * @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 createEnvironmentWithHttpInfo(UUID productId, CreateEnvironmentModel createEnvironmentModel) throws ApiException {
- okhttp3.Call localVarCall = createEnvironmentValidateBeforeCall(productId, createEnvironmentModel, null);
- Type localVarReturnType = new TypeToken(){}.getType();
+ public ApiResponse createEnvironmentWithHttpInfo(
+ UUID productId, CreateEnvironmentModel createEnvironmentModel) throws ApiException {
+ okhttp3.Call localVarCall =
+ createEnvironmentValidateBeforeCall(productId, createEnvironmentModel, null);
+ Type localVarReturnType = new TypeToken() {}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
}
/**
- * Create Environment (asynchronously)
- * This endpoint creates a new Environment in a specified Product identified by the `productId` parameter, which can be obtained from the [List Products](#operation/get-products) endpoint.
+ * Create Environment (asynchronously) This endpoint creates a new Environment 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 createEnvironmentModel (required)
+ * @param createEnvironmentModel (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 createEnvironmentAsync(UUID productId, CreateEnvironmentModel createEnvironmentModel, final ApiCallback _callback) throws ApiException {
-
- okhttp3.Call localVarCall = createEnvironmentValidateBeforeCall(productId, createEnvironmentModel, _callback);
- Type localVarReturnType = new TypeToken(){}.getType();
+ public okhttp3.Call createEnvironmentAsync(
+ UUID productId,
+ CreateEnvironmentModel createEnvironmentModel,
+ final ApiCallback _callback)
+ throws ApiException {
+
+ okhttp3.Call localVarCall =
+ createEnvironmentValidateBeforeCall(productId, createEnvironmentModel, _callback);
+ Type localVarReturnType = new TypeToken() {}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
/**
* Build call for deleteEnvironment
+ *
* @param environmentId The identifier of the Environment. (required)
- * @param cleanupAuditLogs An optional flag which indicates whether the audit log records related to the environment should be deleted or not. (optional)
+ * @param cleanupAuditLogs An optional flag which indicates whether the audit log records
+ * related to the environment should be deleted or not. (optional)
* @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 deleteEnvironmentCall(UUID environmentId, Boolean cleanupAuditLogs, final ApiCallback _callback) throws ApiException {
+ public okhttp3.Call deleteEnvironmentCall(
+ UUID environmentId, Boolean cleanupAuditLogs, 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;
@@ -255,8 +292,11 @@ public okhttp3.Call deleteEnvironmentCall(UUID environmentId, Boolean cleanupAud
Object localVarPostBody = null;
// create path and map variables
- String localVarPath = "/v1/environments/{environmentId}"
- .replace("{" + "environmentId" + "}", localVarApiClient.escapeString(environmentId.toString()));
+ String localVarPath =
+ "/v1/environments/{environmentId}"
+ .replace(
+ "{" + "environmentId" + "}",
+ localVarApiClient.escapeString(environmentId.toString()));
List localVarQueryParams = new ArrayList();
List localVarCollectionQueryParams = new ArrayList();
@@ -265,125 +305,162 @@ public okhttp3.Call deleteEnvironmentCall(UUID environmentId, Boolean cleanupAud
Map localVarFormParams = new HashMap();
if (cleanupAuditLogs != null) {
- localVarQueryParams.addAll(localVarApiClient.parameterToPair("cleanupAuditLogs", cleanupAuditLogs));
+ localVarQueryParams.addAll(
+ localVarApiClient.parameterToPair("cleanupAuditLogs", cleanupAuditLogs));
}
- 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 deleteEnvironmentValidateBeforeCall(UUID environmentId, Boolean cleanupAuditLogs, final ApiCallback _callback) throws ApiException {
+ private okhttp3.Call deleteEnvironmentValidateBeforeCall(
+ UUID environmentId, Boolean cleanupAuditLogs, final ApiCallback _callback)
+ throws ApiException {
// verify the required parameter 'environmentId' is set
if (environmentId == null) {
- throw new ApiException("Missing the required parameter 'environmentId' when calling deleteEnvironment(Async)");
+ throw new ApiException(
+ "Missing the required parameter 'environmentId' when calling"
+ + " deleteEnvironment(Async)");
}
return deleteEnvironmentCall(environmentId, cleanupAuditLogs, _callback);
-
}
/**
- * Delete Environment
- * This endpoint removes an Environment identified by the `environmentId` parameter. If the `cleanupAuditLogs` flag is set to true, it also deletes the audit log records related to the environment (except for the `Created a new environment` and `Deleted an environment` records).
+ * Delete Environment This endpoint removes an Environment identified by the
+ * `environmentId` parameter. If the `cleanupAuditLogs` flag is set to true,
+ * it also deletes the audit log records related to the environment (except for the
+ * `Created a new environment` and `Deleted an environment` records).
+ *
* @param environmentId The identifier of the Environment. (required)
- * @param cleanupAuditLogs An optional flag which indicates whether the audit log records related to the environment should be deleted or not. (optional)
- * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
+ * @param cleanupAuditLogs An optional flag which indicates whether the audit log records
+ * related to the environment should be deleted or not. (optional)
+ * @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 deleteEnvironment(UUID environmentId, Boolean cleanupAuditLogs) throws ApiException {
+ public void deleteEnvironment(UUID environmentId, Boolean cleanupAuditLogs)
+ throws ApiException {
deleteEnvironmentWithHttpInfo(environmentId, cleanupAuditLogs);
}
/**
- * Delete Environment
- * This endpoint removes an Environment identified by the `environmentId` parameter. If the `cleanupAuditLogs` flag is set to true, it also deletes the audit log records related to the environment (except for the `Created a new environment` and `Deleted an environment` records).
+ * Delete Environment This endpoint removes an Environment identified by the
+ * `environmentId` parameter. If the `cleanupAuditLogs` flag is set to true,
+ * it also deletes the audit log records related to the environment (except for the
+ * `Created a new environment` and `Deleted an environment` records).
+ *
* @param environmentId The identifier of the Environment. (required)
- * @param cleanupAuditLogs An optional flag which indicates whether the audit log records related to the environment should be deleted or not. (optional)
+ * @param cleanupAuditLogs An optional flag which indicates whether the audit log records
+ * related to the environment should be deleted or not. (optional)
* @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 deleteEnvironmentWithHttpInfo(UUID environmentId, Boolean cleanupAuditLogs) throws ApiException {
- okhttp3.Call localVarCall = deleteEnvironmentValidateBeforeCall(environmentId, cleanupAuditLogs, null);
+ public ApiResponse deleteEnvironmentWithHttpInfo(
+ UUID environmentId, Boolean cleanupAuditLogs) throws ApiException {
+ okhttp3.Call localVarCall =
+ deleteEnvironmentValidateBeforeCall(environmentId, cleanupAuditLogs, null);
return localVarApiClient.execute(localVarCall);
}
/**
- * Delete Environment (asynchronously)
- * This endpoint removes an Environment identified by the `environmentId` parameter. If the `cleanupAuditLogs` flag is set to true, it also deletes the audit log records related to the environment (except for the `Created a new environment` and `Deleted an environment` records).
+ * Delete Environment (asynchronously) This endpoint removes an Environment identified by the
+ * `environmentId` parameter. If the `cleanupAuditLogs` flag is set to true,
+ * it also deletes the audit log records related to the environment (except for the
+ * `Created a new environment` and `Deleted an environment` records).
+ *
* @param environmentId The identifier of the Environment. (required)
- * @param cleanupAuditLogs An optional flag which indicates whether the audit log records related to the environment should be deleted or not. (optional)
+ * @param cleanupAuditLogs An optional flag which indicates whether the audit log records
+ * related to the environment should be deleted or not. (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 |
- | 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 deleteEnvironmentAsync(UUID environmentId, Boolean cleanupAuditLogs, final ApiCallback _callback) throws ApiException {
+ public okhttp3.Call deleteEnvironmentAsync(
+ UUID environmentId, Boolean cleanupAuditLogs, final ApiCallback _callback)
+ throws ApiException {
- okhttp3.Call localVarCall = deleteEnvironmentValidateBeforeCall(environmentId, cleanupAuditLogs, _callback);
+ okhttp3.Call localVarCall =
+ deleteEnvironmentValidateBeforeCall(environmentId, cleanupAuditLogs, _callback);
localVarApiClient.executeAsync(localVarCall, _callback);
return localVarCall;
}
/**
* Build call for getEnvironment
+ *
* @param environmentId The identifier of the Environment. (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 environment 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 environment 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 getEnvironmentCall(UUID environmentId, final ApiCallback _callback) throws ApiException {
+ public okhttp3.Call getEnvironmentCall(UUID environmentId, 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;
@@ -392,8 +469,11 @@ public okhttp3.Call getEnvironmentCall(UUID environmentId, final ApiCallback _ca
Object localVarPostBody = null;
// create path and map variables
- String localVarPath = "/v1/environments/{environmentId}"
- .replace("{" + "environmentId" + "}", localVarApiClient.escapeString(environmentId.toString()));
+ String localVarPath =
+ "/v1/environments/{environmentId}"
+ .replace(
+ "{" + "environmentId" + "}",
+ localVarApiClient.escapeString(environmentId.toString()));
List localVarQueryParams = new ArrayList();
List localVarCollectionQueryParams = new ArrayList();
@@ -401,50 +481,63 @@ public okhttp3.Call getEnvironmentCall(UUID environmentId, final ApiCallback _ca
Map localVarCookieParams = new HashMap();
Map localVarFormParams = new HashMap