All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.configcat.publicapi.java.client.api.EnvironmentsApi Maven / Gradle / Ivy

/*
 * 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 version of the OpenAPI document: v1
 * Contact: [email protected]
 *
 * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
 * https://openapi-generator.tech
 * 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.model.CreateEnvironmentModel;
import com.configcat.publicapi.java.client.model.EnvironmentModel;
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;
    private int localHostIndex;
    private String localCustomBaseUrl;

    public EnvironmentsApi() {
        this(Configuration.getDefaultApiClient());
    }

    public EnvironmentsApi(ApiClient apiClient) {
        this.localVarApiClient = apiClient;
    }

    public ApiClient getApiClient() {
        return localVarApiClient;
    }

    public void setApiClient(ApiClient apiClient) {
        this.localVarApiClient = apiClient;
    }

    public int getHostIndex() {
        return localHostIndex;
    }

    public void setHostIndex(int hostIndex) {
        this.localHostIndex = hostIndex;
    }

    public String getCustomBaseUrl() {
        return localCustomBaseUrl;
    }

    public void setCustomBaseUrl(String customBaseUrl) {
        this.localCustomBaseUrl = customBaseUrl;
    }

    /**
     * Build call for createEnvironment
     *
     * @param productId The identifier of the Product. (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. -
*/ public okhttp3.Call createEnvironmentCall( UUID productId, CreateEnvironmentModel createEnvironmentModel, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] {}; // Determine Base Path to Use if (localCustomBaseUrl != null) { basePath = localCustomBaseUrl; } else if (localBasePaths.length > 0) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; } Object localVarPostBody = createEnvironmentModel; // create path and map variables String localVarPath = "/v1/products/{productId}/environments" .replace( "{" + "productId" + "}", localVarApiClient.escapeString(productId.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); 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" }; 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); } @SuppressWarnings("rawtypes") 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)"); } // verify the required parameter 'createEnvironmentModel' is set if (createEnvironmentModel == null) { 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. * * @param productId The identifier of the Product. (required) * @param createEnvironmentModel (required) * @return EnvironmentModel * @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. -
*/ 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. * * @param productId The identifier of the Product. (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 * @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. -
*/ 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. * * @param productId The identifier of the Product. (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 * @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. -
*/ 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 _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. -
*/ public okhttp3.Call deleteEnvironmentCall( UUID environmentId, Boolean cleanupAuditLogs, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] {}; // Determine Base Path to Use if (localCustomBaseUrl != null) { basePath = localCustomBaseUrl; } else if (localBasePaths.length > 0) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; } Object localVarPostBody = null; // create path and map variables String localVarPath = "/v1/environments/{environmentId}" .replace( "{" + "environmentId" + "}", localVarApiClient.escapeString(environmentId.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); if (cleanupAuditLogs != null) { localVarQueryParams.addAll( localVarApiClient.parameterToPair("cleanupAuditLogs", cleanupAuditLogs)); } 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); 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); } @SuppressWarnings("rawtypes") 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)"); } 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). * * @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 * @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. -
*/ 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). * * @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) * @return ApiResponse<Void> * @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. -
*/ 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). * * @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 _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 * @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. -
*/ public okhttp3.Call deleteEnvironmentAsync( UUID environmentId, Boolean cleanupAuditLogs, final ApiCallback _callback) throws ApiException { 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. -
*/ public okhttp3.Call getEnvironmentCall(UUID environmentId, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] {}; // Determine Base Path to Use if (localCustomBaseUrl != null) { basePath = localCustomBaseUrl; } else if (localBasePaths.length > 0) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; } Object localVarPostBody = null; // create path and map variables String localVarPath = "/v1/environments/{environmentId}" .replace( "{" + "environmentId" + "}", localVarApiClient.escapeString(environmentId.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); 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); 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); } @SuppressWarnings("rawtypes") private okhttp3.Call getEnvironmentValidateBeforeCall( UUID environmentId, 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" + " getEnvironment(Async)"); } return getEnvironmentCall(environmentId, _callback); } /** * Get Environment This endpoint returns the metadata of an Environment identified by the * `environmentId`. * * @param environmentId The identifier of the Environment. (required) * @return EnvironmentModel * @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 environment data returned. -
400 Bad request. -
404 Not found. -
429 Too many requests. In case of the request rate exceeds the rate limits. -
*/ public EnvironmentModel getEnvironment(UUID environmentId) throws ApiException { ApiResponse localVarResp = getEnvironmentWithHttpInfo(environmentId); return localVarResp.getData(); } /** * Get Environment This endpoint returns the metadata of an Environment identified by the * `environmentId`. * * @param environmentId The identifier of the Environment. (required) * @return ApiResponse<EnvironmentModel> * @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 environment data returned. -
400 Bad request. -
404 Not found. -
429 Too many requests. In case of the request rate exceeds the rate limits. -
*/ public ApiResponse getEnvironmentWithHttpInfo(UUID environmentId) throws ApiException { okhttp3.Call localVarCall = getEnvironmentValidateBeforeCall(environmentId, null); Type localVarReturnType = new TypeToken() {}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * Get Environment (asynchronously) This endpoint returns the metadata of an Environment * identified by the `environmentId`. * * @param environmentId The identifier of the Environment. (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 * @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. -
*/ public okhttp3.Call getEnvironmentAsync( UUID environmentId, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = getEnvironmentValidateBeforeCall(environmentId, _callback); Type localVarReturnType = new TypeToken() {}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for getEnvironments * * @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. -
*/ public okhttp3.Call getEnvironmentsCall(UUID productId, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] {}; // Determine Base Path to Use if (localCustomBaseUrl != null) { basePath = localCustomBaseUrl; } else if (localBasePaths.length > 0) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; } Object localVarPostBody = null; // create path and map variables String localVarPath = "/v1/products/{productId}/environments" .replace( "{" + "productId" + "}", localVarApiClient.escapeString(productId.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); 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); 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); } @SuppressWarnings("rawtypes") private okhttp3.Call getEnvironmentsValidateBeforeCall( 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" + " getEnvironments(Async)"); } return getEnvironmentsCall(productId, _callback); } /** * List Environments This endpoint returns the list of the Environments 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<EnvironmentModel> * @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. -
*/ public List getEnvironments(UUID productId) throws ApiException { ApiResponse> localVarResp = getEnvironmentsWithHttpInfo(productId); return localVarResp.getData(); } /** * List Environments This endpoint returns the list of the Environments 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<EnvironmentModel>> * @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. -
*/ public ApiResponse> getEnvironmentsWithHttpInfo(UUID productId) throws ApiException { okhttp3.Call localVarCall = getEnvironmentsValidateBeforeCall(productId, null); Type localVarReturnType = new TypeToken>() {}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * List Environments (asynchronously) This endpoint returns the list of the Environments 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 * @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. -
*/ public okhttp3.Call getEnvironmentsAsync( UUID productId, final ApiCallback> _callback) throws ApiException { okhttp3.Call localVarCall = getEnvironmentsValidateBeforeCall(productId, _callback); Type localVarReturnType = new TypeToken>() {}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for updateEnvironment * * @param environmentId The identifier of the Environment. (required) * @param updateEnvironmentModel (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. -
*/ public okhttp3.Call updateEnvironmentCall( UUID environmentId, UpdateEnvironmentModel updateEnvironmentModel, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] {}; // Determine Base Path to Use if (localCustomBaseUrl != null) { basePath = localCustomBaseUrl; } else if (localBasePaths.length > 0) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; } Object localVarPostBody = updateEnvironmentModel; // create path and map variables String localVarPath = "/v1/environments/{environmentId}" .replace( "{" + "environmentId" + "}", localVarApiClient.escapeString(environmentId.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); 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" }; 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); } @SuppressWarnings("rawtypes") private okhttp3.Call updateEnvironmentValidateBeforeCall( UUID environmentId, UpdateEnvironmentModel updateEnvironmentModel, 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" + " updateEnvironment(Async)"); } // verify the required parameter 'updateEnvironmentModel' is set if (updateEnvironmentModel == null) { throw new ApiException( "Missing the required parameter 'updateEnvironmentModel' when calling" + " updateEnvironment(Async)"); } return updateEnvironmentCall(environmentId, updateEnvironmentModel, _callback); } /** * Update Environment This endpoint updates an Environment identified by the * `environmentId` parameter. * * @param environmentId The identifier of the Environment. (required) * @param updateEnvironmentModel (required) * @return EnvironmentModel * @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. -
*/ public EnvironmentModel updateEnvironment( UUID environmentId, UpdateEnvironmentModel updateEnvironmentModel) throws ApiException { ApiResponse localVarResp = updateEnvironmentWithHttpInfo(environmentId, updateEnvironmentModel); return localVarResp.getData(); } /** * Update Environment This endpoint updates an Environment identified by the * `environmentId` parameter. * * @param environmentId The identifier of the Environment. (required) * @param updateEnvironmentModel (required) * @return ApiResponse<EnvironmentModel> * @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. -
*/ public ApiResponse updateEnvironmentWithHttpInfo( UUID environmentId, UpdateEnvironmentModel updateEnvironmentModel) throws ApiException { okhttp3.Call localVarCall = updateEnvironmentValidateBeforeCall(environmentId, updateEnvironmentModel, null); Type localVarReturnType = new TypeToken() {}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * Update Environment (asynchronously) This endpoint updates an Environment identified by the * `environmentId` parameter. * * @param environmentId The identifier of the Environment. (required) * @param updateEnvironmentModel (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 * @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. -
*/ public okhttp3.Call updateEnvironmentAsync( UUID environmentId, UpdateEnvironmentModel updateEnvironmentModel, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = updateEnvironmentValidateBeforeCall( environmentId, updateEnvironmentModel, _callback); Type localVarReturnType = new TypeToken() {}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy