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

io.harness.cf.api.ClientApi Maven / Gradle / Ivy

The newest version!
/*
 * Harness feature flag service client apis
 * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
 *
 * The version of the OpenAPI document: 1.0.0
 * 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 io.harness.cf.api;

import io.harness.cf.ApiCallback;
import io.harness.cf.ApiClient;
import io.harness.cf.ApiException;
import io.harness.cf.ApiResponse;
import io.harness.cf.Configuration;
import io.harness.cf.Pair;
import io.harness.cf.ProgressRequestBody;
import io.harness.cf.ProgressResponseBody;

import com.google.gson.reflect.TypeToken;

import java.io.IOException;


import io.harness.cf.model.AuthenticationRequest;
import io.harness.cf.model.AuthenticationResponse;
import io.harness.cf.model.Error;
import io.harness.cf.model.Evaluation;
import io.harness.cf.model.FeatureConfig;
import io.harness.cf.model.Pagination;
import io.harness.cf.model.Segment;

import java.lang.reflect.Type;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

public class ClientApi {
    private ApiClient localVarApiClient;

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

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

    public ApiClient getApiClient() {
        return localVarApiClient;
    }

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

    /**
     * Build call for authenticate
     * @param authenticationRequest  (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
200 OK -
401 Unauthenticated -
403 Unauthorized -
404 The specified resource was not found -
500 Internal server error -
*/ public okhttp3.Call authenticateCall(AuthenticationRequest authenticationRequest, final ApiCallback _callback) throws ApiException { Object localVarPostBody = authenticationRequest; // create path and map variables String localVarPath = "/client/auth"; 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" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); String[] localVarAuthNames = new String[] { }; return localVarApiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call authenticateValidateBeforeCall(AuthenticationRequest authenticationRequest, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = authenticateCall(authenticationRequest, _callback); return localVarCall; } /** * Authenticate with the admin server. * Used to retrieve all target segments for certain account id. * @param authenticationRequest (optional) * @return AuthenticationResponse * @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 -
401 Unauthenticated -
403 Unauthorized -
404 The specified resource was not found -
500 Internal server error -
*/ public AuthenticationResponse authenticate(AuthenticationRequest authenticationRequest) throws ApiException { ApiResponse localVarResp = authenticateWithHttpInfo(authenticationRequest); return localVarResp.getData(); } /** * Authenticate with the admin server. * Used to retrieve all target segments for certain account id. * @param authenticationRequest (optional) * @return ApiResponse<AuthenticationResponse> * @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 -
401 Unauthenticated -
403 Unauthorized -
404 The specified resource was not found -
500 Internal server error -
*/ public ApiResponse authenticateWithHttpInfo(AuthenticationRequest authenticationRequest) throws ApiException { okhttp3.Call localVarCall = authenticateValidateBeforeCall(authenticationRequest, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * Authenticate with the admin server. (asynchronously) * Used to retrieve all target segments for certain account id. * @param authenticationRequest (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
200 OK -
401 Unauthenticated -
403 Unauthorized -
404 The specified resource was not found -
500 Internal server error -
*/ public okhttp3.Call authenticateAsync(AuthenticationRequest authenticationRequest, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = authenticateValidateBeforeCall(authenticationRequest, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for getAllSegments * @param environmentUUID Unique identifier for the environment object in the API. (required) * @param cluster Unique identifier for the cluster for the account (optional) * @param rules When set to rules=v2 will return AND rule compatible serving_rules field. When not set or set to any other value will return old rules field only compatible with OR rules. (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
200 OK -
401 Unauthenticated -
403 Unauthorized -
404 The specified resource was not found -
500 Internal server error -
*/ public okhttp3.Call getAllSegmentsCall(String environmentUUID, String cluster, String rules, final ApiCallback _callback) throws ApiException { Object localVarPostBody = null; // create path and map variables String localVarPath = "/client/env/{environmentUUID}/target-segments" .replaceAll("\\{" + "environmentUUID" + "\\}", localVarApiClient.escapeString(environmentUUID.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); if (cluster != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("cluster", cluster)); } if (rules != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("rules", rules)); } 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); localVarHeaderParams.put("Content-Type", localVarContentType); String[] localVarAuthNames = new String[] { "BearerAuth" }; return localVarApiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call getAllSegmentsValidateBeforeCall(String environmentUUID, String cluster, String rules, final ApiCallback _callback) throws ApiException { // verify the required parameter 'environmentUUID' is set if (environmentUUID == null) { throw new ApiException("Missing the required parameter 'environmentUUID' when calling getAllSegments(Async)"); } okhttp3.Call localVarCall = getAllSegmentsCall(environmentUUID, cluster, rules, _callback); return localVarCall; } /** * Retrieve all segments. * Used to retrieve all segments for certain account id. * @param environmentUUID Unique identifier for the environment object in the API. (required) * @param cluster Unique identifier for the cluster for the account (optional) * @param rules When set to rules=v2 will return AND rule compatible serving_rules field. When not set or set to any other value will return old rules field only compatible with OR rules. (optional) * @return List<Segment> * @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 -
401 Unauthenticated -
403 Unauthorized -
404 The specified resource was not found -
500 Internal server error -
*/ public List getAllSegments(String environmentUUID, String cluster, String rules) throws ApiException { ApiResponse> localVarResp = getAllSegmentsWithHttpInfo(environmentUUID, cluster, rules); return localVarResp.getData(); } /** * Retrieve all segments. * Used to retrieve all segments for certain account id. * @param environmentUUID Unique identifier for the environment object in the API. (required) * @param cluster Unique identifier for the cluster for the account (optional) * @param rules When set to rules=v2 will return AND rule compatible serving_rules field. When not set or set to any other value will return old rules field only compatible with OR rules. (optional) * @return ApiResponse<List<Segment>> * @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 -
401 Unauthenticated -
403 Unauthorized -
404 The specified resource was not found -
500 Internal server error -
*/ public ApiResponse> getAllSegmentsWithHttpInfo(String environmentUUID, String cluster, String rules) throws ApiException { okhttp3.Call localVarCall = getAllSegmentsValidateBeforeCall(environmentUUID, cluster, rules, null); Type localVarReturnType = new TypeToken>(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * Retrieve all segments. (asynchronously) * Used to retrieve all segments for certain account id. * @param environmentUUID Unique identifier for the environment object in the API. (required) * @param cluster Unique identifier for the cluster for the account (optional) * @param rules When set to rules=v2 will return AND rule compatible serving_rules field. When not set or set to any other value will return old rules field only compatible with OR rules. (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
200 OK -
401 Unauthenticated -
403 Unauthorized -
404 The specified resource was not found -
500 Internal server error -
*/ public okhttp3.Call getAllSegmentsAsync(String environmentUUID, String cluster, String rules, final ApiCallback> _callback) throws ApiException { okhttp3.Call localVarCall = getAllSegmentsValidateBeforeCall(environmentUUID, cluster, rules, _callback); Type localVarReturnType = new TypeToken>(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for getEvaluationByIdentifier * @param environmentUUID Unique identifier for the environment object in the API. (required) * @param feature Unique identifier for the flag object in the API. (required) * @param target Unique identifier for the target object in the API. (required) * @param cluster Unique identifier for the cluster for the account (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
200 OK -
*/ public okhttp3.Call getEvaluationByIdentifierCall(String environmentUUID, String feature, String target, String cluster, final ApiCallback _callback) throws ApiException { Object localVarPostBody = null; // create path and map variables String localVarPath = "/client/env/{environmentUUID}/target/{target}/evaluations/{feature}" .replaceAll("\\{" + "environmentUUID" + "\\}", localVarApiClient.escapeString(environmentUUID.toString())) .replaceAll("\\{" + "feature" + "\\}", localVarApiClient.escapeString(feature.toString())) .replaceAll("\\{" + "target" + "\\}", localVarApiClient.escapeString(target.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); if (cluster != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("cluster", cluster)); } 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); localVarHeaderParams.put("Content-Type", localVarContentType); String[] localVarAuthNames = new String[] { "BearerAuth" }; return localVarApiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call getEvaluationByIdentifierValidateBeforeCall(String environmentUUID, String feature, String target, String cluster, final ApiCallback _callback) throws ApiException { // verify the required parameter 'environmentUUID' is set if (environmentUUID == null) { throw new ApiException("Missing the required parameter 'environmentUUID' when calling getEvaluationByIdentifier(Async)"); } // verify the required parameter 'feature' is set if (feature == null) { throw new ApiException("Missing the required parameter 'feature' when calling getEvaluationByIdentifier(Async)"); } // verify the required parameter 'target' is set if (target == null) { throw new ApiException("Missing the required parameter 'target' when calling getEvaluationByIdentifier(Async)"); } okhttp3.Call localVarCall = getEvaluationByIdentifierCall(environmentUUID, feature, target, cluster, _callback); return localVarCall; } /** * Get feature evaluations for target * * @param environmentUUID Unique identifier for the environment object in the API. (required) * @param feature Unique identifier for the flag object in the API. (required) * @param target Unique identifier for the target object in the API. (required) * @param cluster Unique identifier for the cluster for the account (optional) * @return Evaluation * @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 -
*/ public Evaluation getEvaluationByIdentifier(String environmentUUID, String feature, String target, String cluster) throws ApiException { ApiResponse localVarResp = getEvaluationByIdentifierWithHttpInfo(environmentUUID, feature, target, cluster); return localVarResp.getData(); } /** * Get feature evaluations for target * * @param environmentUUID Unique identifier for the environment object in the API. (required) * @param feature Unique identifier for the flag object in the API. (required) * @param target Unique identifier for the target object in the API. (required) * @param cluster Unique identifier for the cluster for the account (optional) * @return ApiResponse<Evaluation> * @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 -
*/ public ApiResponse getEvaluationByIdentifierWithHttpInfo(String environmentUUID, String feature, String target, String cluster) throws ApiException { okhttp3.Call localVarCall = getEvaluationByIdentifierValidateBeforeCall(environmentUUID, feature, target, cluster, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * Get feature evaluations for target (asynchronously) * * @param environmentUUID Unique identifier for the environment object in the API. (required) * @param feature Unique identifier for the flag object in the API. (required) * @param target Unique identifier for the target object in the API. (required) * @param cluster Unique identifier for the cluster for the account (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
200 OK -
*/ public okhttp3.Call getEvaluationByIdentifierAsync(String environmentUUID, String feature, String target, String cluster, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = getEvaluationByIdentifierValidateBeforeCall(environmentUUID, feature, target, cluster, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for getEvaluations * @param environmentUUID Unique identifier for the environment object in the API. (required) * @param target Unique identifier for the target object in the API. (required) * @param cluster Unique identifier for the cluster for the account (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
200 OK -
*/ public okhttp3.Call getEvaluationsCall(String environmentUUID, String target, String cluster, final ApiCallback _callback) throws ApiException { Object localVarPostBody = null; // create path and map variables String localVarPath = "/client/env/{environmentUUID}/target/{target}/evaluations" .replaceAll("\\{" + "environmentUUID" + "\\}", localVarApiClient.escapeString(environmentUUID.toString())) .replaceAll("\\{" + "target" + "\\}", localVarApiClient.escapeString(target.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); if (cluster != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("cluster", cluster)); } 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); localVarHeaderParams.put("Content-Type", localVarContentType); String[] localVarAuthNames = new String[] { "BearerAuth" }; return localVarApiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call getEvaluationsValidateBeforeCall(String environmentUUID, String target, String cluster, final ApiCallback _callback) throws ApiException { // verify the required parameter 'environmentUUID' is set if (environmentUUID == null) { throw new ApiException("Missing the required parameter 'environmentUUID' when calling getEvaluations(Async)"); } // verify the required parameter 'target' is set if (target == null) { throw new ApiException("Missing the required parameter 'target' when calling getEvaluations(Async)"); } okhttp3.Call localVarCall = getEvaluationsCall(environmentUUID, target, cluster, _callback); return localVarCall; } /** * Get feature evaluations for target * * @param environmentUUID Unique identifier for the environment object in the API. (required) * @param target Unique identifier for the target object in the API. (required) * @param cluster Unique identifier for the cluster for the account (optional) * @return Pagination * @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 -
*/ public Pagination getEvaluations(String environmentUUID, String target, String cluster) throws ApiException { ApiResponse localVarResp = getEvaluationsWithHttpInfo(environmentUUID, target, cluster); return localVarResp.getData(); } /** * Get feature evaluations for target * * @param environmentUUID Unique identifier for the environment object in the API. (required) * @param target Unique identifier for the target object in the API. (required) * @param cluster Unique identifier for the cluster for the account (optional) * @return ApiResponse<Pagination> * @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 -
*/ public ApiResponse getEvaluationsWithHttpInfo(String environmentUUID, String target, String cluster) throws ApiException { okhttp3.Call localVarCall = getEvaluationsValidateBeforeCall(environmentUUID, target, cluster, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * Get feature evaluations for target (asynchronously) * * @param environmentUUID Unique identifier for the environment object in the API. (required) * @param target Unique identifier for the target object in the API. (required) * @param cluster Unique identifier for the cluster for the account (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
200 OK -
*/ public okhttp3.Call getEvaluationsAsync(String environmentUUID, String target, String cluster, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = getEvaluationsValidateBeforeCall(environmentUUID, target, cluster, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for getFeatureConfig * @param environmentUUID Unique identifier for the environment object in the API. (required) * @param cluster Unique identifier for the cluster for the account (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
200 OK -
*/ public okhttp3.Call getFeatureConfigCall(String environmentUUID, String cluster, final ApiCallback _callback) throws ApiException { Object localVarPostBody = null; // create path and map variables String localVarPath = "/client/env/{environmentUUID}/feature-configs" .replaceAll("\\{" + "environmentUUID" + "\\}", localVarApiClient.escapeString(environmentUUID.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); if (cluster != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("cluster", cluster)); } 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); localVarHeaderParams.put("Content-Type", localVarContentType); String[] localVarAuthNames = new String[] { "BearerAuth" }; return localVarApiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call getFeatureConfigValidateBeforeCall(String environmentUUID, String cluster, final ApiCallback _callback) throws ApiException { // verify the required parameter 'environmentUUID' is set if (environmentUUID == null) { throw new ApiException("Missing the required parameter 'environmentUUID' when calling getFeatureConfig(Async)"); } okhttp3.Call localVarCall = getFeatureConfigCall(environmentUUID, cluster, _callback); return localVarCall; } /** * Get all feature flags activations * All feature flags with activations in project environment * @param environmentUUID Unique identifier for the environment object in the API. (required) * @param cluster Unique identifier for the cluster for the account (optional) * @return List<FeatureConfig> * @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 -
*/ public List getFeatureConfig(String environmentUUID, String cluster) throws ApiException { ApiResponse> localVarResp = getFeatureConfigWithHttpInfo(environmentUUID, cluster); return localVarResp.getData(); } /** * Get all feature flags activations * All feature flags with activations in project environment * @param environmentUUID Unique identifier for the environment object in the API. (required) * @param cluster Unique identifier for the cluster for the account (optional) * @return ApiResponse<List<FeatureConfig>> * @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 -
*/ public ApiResponse> getFeatureConfigWithHttpInfo(String environmentUUID, String cluster) throws ApiException { okhttp3.Call localVarCall = getFeatureConfigValidateBeforeCall(environmentUUID, cluster, null); Type localVarReturnType = new TypeToken>(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * Get all feature flags activations (asynchronously) * All feature flags with activations in project environment * @param environmentUUID Unique identifier for the environment object in the API. (required) * @param cluster Unique identifier for the cluster for the account (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
200 OK -
*/ public okhttp3.Call getFeatureConfigAsync(String environmentUUID, String cluster, final ApiCallback> _callback) throws ApiException { okhttp3.Call localVarCall = getFeatureConfigValidateBeforeCall(environmentUUID, cluster, _callback); Type localVarReturnType = new TypeToken>(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for getFeatureConfigByIdentifier * @param identifier Unique identifier for the flag object in the API. (required) * @param environmentUUID Unique identifier for the environment object in the API. (required) * @param cluster Unique identifier for the cluster for the account (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
200 OK -
*/ public okhttp3.Call getFeatureConfigByIdentifierCall(String identifier, String environmentUUID, String cluster, final ApiCallback _callback) throws ApiException { Object localVarPostBody = null; // create path and map variables String localVarPath = "/client/env/{environmentUUID}/feature-configs/{identifier}" .replaceAll("\\{" + "identifier" + "\\}", localVarApiClient.escapeString(identifier.toString())) .replaceAll("\\{" + "environmentUUID" + "\\}", localVarApiClient.escapeString(environmentUUID.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); if (cluster != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("cluster", cluster)); } 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); localVarHeaderParams.put("Content-Type", localVarContentType); String[] localVarAuthNames = new String[] { "BearerAuth" }; return localVarApiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call getFeatureConfigByIdentifierValidateBeforeCall(String identifier, String environmentUUID, String cluster, final ApiCallback _callback) throws ApiException { // verify the required parameter 'identifier' is set if (identifier == null) { throw new ApiException("Missing the required parameter 'identifier' when calling getFeatureConfigByIdentifier(Async)"); } // verify the required parameter 'environmentUUID' is set if (environmentUUID == null) { throw new ApiException("Missing the required parameter 'environmentUUID' when calling getFeatureConfigByIdentifier(Async)"); } okhttp3.Call localVarCall = getFeatureConfigByIdentifierCall(identifier, environmentUUID, cluster, _callback); return localVarCall; } /** * Get feature config * * @param identifier Unique identifier for the flag object in the API. (required) * @param environmentUUID Unique identifier for the environment object in the API. (required) * @param cluster Unique identifier for the cluster for the account (optional) * @return FeatureConfig * @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 -
*/ public FeatureConfig getFeatureConfigByIdentifier(String identifier, String environmentUUID, String cluster) throws ApiException { ApiResponse localVarResp = getFeatureConfigByIdentifierWithHttpInfo(identifier, environmentUUID, cluster); return localVarResp.getData(); } /** * Get feature config * * @param identifier Unique identifier for the flag object in the API. (required) * @param environmentUUID Unique identifier for the environment object in the API. (required) * @param cluster Unique identifier for the cluster for the account (optional) * @return ApiResponse<FeatureConfig> * @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 -
*/ public ApiResponse getFeatureConfigByIdentifierWithHttpInfo(String identifier, String environmentUUID, String cluster) throws ApiException { okhttp3.Call localVarCall = getFeatureConfigByIdentifierValidateBeforeCall(identifier, environmentUUID, cluster, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * Get feature config (asynchronously) * * @param identifier Unique identifier for the flag object in the API. (required) * @param environmentUUID Unique identifier for the environment object in the API. (required) * @param cluster Unique identifier for the cluster for the account (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
200 OK -
*/ public okhttp3.Call getFeatureConfigByIdentifierAsync(String identifier, String environmentUUID, String cluster, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = getFeatureConfigByIdentifierValidateBeforeCall(identifier, environmentUUID, cluster, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for getSegmentByIdentifier * @param identifier Unique identifier for the segment object in the API (required) * @param environmentUUID Unique identifier for the environment object in the API (required) * @param cluster Unique identifier for the cluster for the account (optional) * @param rules When set to rules=v2 will return AND rule compatible serving_rules field. When not set or set to any other value will return old rules field only compatible with OR rules. (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
200 OK -
401 Unauthenticated -
403 Unauthorized -
404 The specified resource was not found -
500 Internal server error -
*/ public okhttp3.Call getSegmentByIdentifierCall(String identifier, String environmentUUID, String cluster, String rules, final ApiCallback _callback) throws ApiException { Object localVarPostBody = null; // create path and map variables String localVarPath = "/client/env/{environmentUUID}/target-segments/{identifier}" .replaceAll("\\{" + "identifier" + "\\}", localVarApiClient.escapeString(identifier.toString())) .replaceAll("\\{" + "environmentUUID" + "\\}", localVarApiClient.escapeString(environmentUUID.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); if (cluster != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("cluster", cluster)); } if (rules != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("rules", rules)); } 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); localVarHeaderParams.put("Content-Type", localVarContentType); String[] localVarAuthNames = new String[] { "BearerAuth" }; return localVarApiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call getSegmentByIdentifierValidateBeforeCall(String identifier, String environmentUUID, String cluster, String rules, final ApiCallback _callback) throws ApiException { // verify the required parameter 'identifier' is set if (identifier == null) { throw new ApiException("Missing the required parameter 'identifier' when calling getSegmentByIdentifier(Async)"); } // verify the required parameter 'environmentUUID' is set if (environmentUUID == null) { throw new ApiException("Missing the required parameter 'environmentUUID' when calling getSegmentByIdentifier(Async)"); } okhttp3.Call localVarCall = getSegmentByIdentifierCall(identifier, environmentUUID, cluster, rules, _callback); return localVarCall; } /** * Retrieve a segment by identifier * Used to retrieve a segment for a certain account id by identifier * @param identifier Unique identifier for the segment object in the API (required) * @param environmentUUID Unique identifier for the environment object in the API (required) * @param cluster Unique identifier for the cluster for the account (optional) * @param rules When set to rules=v2 will return AND rule compatible serving_rules field. When not set or set to any other value will return old rules field only compatible with OR rules. (optional) * @return Segment * @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 -
401 Unauthenticated -
403 Unauthorized -
404 The specified resource was not found -
500 Internal server error -
*/ public Segment getSegmentByIdentifier(String identifier, String environmentUUID, String cluster, String rules) throws ApiException { ApiResponse localVarResp = getSegmentByIdentifierWithHttpInfo(identifier, environmentUUID, cluster, rules); return localVarResp.getData(); } /** * Retrieve a segment by identifier * Used to retrieve a segment for a certain account id by identifier * @param identifier Unique identifier for the segment object in the API (required) * @param environmentUUID Unique identifier for the environment object in the API (required) * @param cluster Unique identifier for the cluster for the account (optional) * @param rules When set to rules=v2 will return AND rule compatible serving_rules field. When not set or set to any other value will return old rules field only compatible with OR rules. (optional) * @return ApiResponse<Segment> * @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 -
401 Unauthenticated -
403 Unauthorized -
404 The specified resource was not found -
500 Internal server error -
*/ public ApiResponse getSegmentByIdentifierWithHttpInfo(String identifier, String environmentUUID, String cluster, String rules) throws ApiException { okhttp3.Call localVarCall = getSegmentByIdentifierValidateBeforeCall(identifier, environmentUUID, cluster, rules, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * Retrieve a segment by identifier (asynchronously) * Used to retrieve a segment for a certain account id by identifier * @param identifier Unique identifier for the segment object in the API (required) * @param environmentUUID Unique identifier for the environment object in the API (required) * @param cluster Unique identifier for the cluster for the account (optional) * @param rules When set to rules=v2 will return AND rule compatible serving_rules field. When not set or set to any other value will return old rules field only compatible with OR rules. (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
200 OK -
401 Unauthenticated -
403 Unauthorized -
404 The specified resource was not found -
500 Internal server error -
*/ public okhttp3.Call getSegmentByIdentifierAsync(String identifier, String environmentUUID, String cluster, String rules, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = getSegmentByIdentifierValidateBeforeCall(identifier, environmentUUID, cluster, rules, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for stream * @param apIKey (required) * @param cluster Unique identifier for the cluster for the account (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
200 OK * Content-Type -
* Cache-Control -
* Connection -
* Access-Control-Allow-Origin -
503 Service Unavailable -
*/ public okhttp3.Call streamCall(String apIKey, String cluster, final ApiCallback _callback) throws ApiException { Object localVarPostBody = null; // create path and map variables String localVarPath = "/stream"; List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); if (cluster != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("cluster", cluster)); } Map localVarHeaderParams = new HashMap(); if (apIKey != null) { localVarHeaderParams.put("API-Key", localVarApiClient.parameterToString(apIKey)); } Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); 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); localVarHeaderParams.put("Content-Type", localVarContentType); String[] localVarAuthNames = new String[] { "BearerAuth" }; return localVarApiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call streamValidateBeforeCall(String apIKey, String cluster, final ApiCallback _callback) throws ApiException { // verify the required parameter 'apIKey' is set if (apIKey == null) { throw new ApiException("Missing the required parameter 'apIKey' when calling stream(Async)"); } okhttp3.Call localVarCall = streamCall(apIKey, cluster, _callback); return localVarCall; } /** * Stream endpoint. * * @param apIKey (required) * @param cluster Unique identifier for the cluster for the account (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
200 OK * Content-Type -
* Cache-Control -
* Connection -
* Access-Control-Allow-Origin -
503 Service Unavailable -
*/ public void stream(String apIKey, String cluster) throws ApiException { streamWithHttpInfo(apIKey, cluster); } /** * Stream endpoint. * * @param apIKey (required) * @param cluster Unique identifier for the cluster for the account (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
200 OK * Content-Type -
* Cache-Control -
* Connection -
* Access-Control-Allow-Origin -
503 Service Unavailable -
*/ public ApiResponse streamWithHttpInfo(String apIKey, String cluster) throws ApiException { okhttp3.Call localVarCall = streamValidateBeforeCall(apIKey, cluster, null); return localVarApiClient.execute(localVarCall); } /** * Stream endpoint. (asynchronously) * * @param apIKey (required) * @param cluster Unique identifier for the cluster for the account (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
200 OK * Content-Type -
* Cache-Control -
* Connection -
* Access-Control-Allow-Origin -
503 Service Unavailable -
*/ public okhttp3.Call streamAsync(String apIKey, String cluster, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = streamValidateBeforeCall(apIKey, cluster, _callback); localVarApiClient.executeAsync(localVarCall, _callback); return localVarCall; } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy