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

io.harness.cf.api.ProxyApi 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.AuthenticationResponse;
import io.harness.cf.model.Error;
import io.harness.cf.model.InlineObject;
import io.harness.cf.model.ProxyConfig;

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

public class ProxyApi {
    private ApiClient localVarApiClient;

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

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

    public ApiClient getApiClient() {
        return localVarApiClient;
    }

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

    /**
     * Build call for authenticateProxyKey
     * @param inlineObject  (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 authenticateProxyKeyCall(InlineObject inlineObject, final ApiCallback _callback) throws ApiException { Object localVarPostBody = inlineObject; // create path and map variables String localVarPath = "/proxy/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 authenticateProxyKeyValidateBeforeCall(InlineObject inlineObject, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = authenticateProxyKeyCall(inlineObject, _callback); return localVarCall; } /** * Endpoint that the Proxy can use to authenticate with the client server * Endpoint that the Proxy can use to authenticate with the client server * @param inlineObject (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 authenticateProxyKey(InlineObject inlineObject) throws ApiException { ApiResponse localVarResp = authenticateProxyKeyWithHttpInfo(inlineObject); return localVarResp.getData(); } /** * Endpoint that the Proxy can use to authenticate with the client server * Endpoint that the Proxy can use to authenticate with the client server * @param inlineObject (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 authenticateProxyKeyWithHttpInfo(InlineObject inlineObject) throws ApiException { okhttp3.Call localVarCall = authenticateProxyKeyValidateBeforeCall(inlineObject, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * Endpoint that the Proxy can use to authenticate with the client server (asynchronously) * Endpoint that the Proxy can use to authenticate with the client server * @param inlineObject (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 authenticateProxyKeyAsync(InlineObject inlineObject, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = authenticateProxyKeyValidateBeforeCall(inlineObject, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for getProxyConfig * @param key Accpets a Proxy Key. (required) * @param pageNumber PageNumber (optional) * @param pageSize PageSize (optional) * @param cluster Unique identifier for the cluster for the account (optional) * @param environment Accepts an EnvironmentID. If this is provided then the endpoint will only return config for this environment. If this is left empty then the Proxy will return config for all environments associated with the Proxy Key. (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 -
400 Bad request -
401 Unauthenticated -
403 Unauthorized -
404 The specified resource was not found -
500 Internal server error -
*/ public okhttp3.Call getProxyConfigCall(String key, Integer pageNumber, Integer pageSize, String cluster, String environment, final ApiCallback _callback) throws ApiException { Object localVarPostBody = null; // create path and map variables String localVarPath = "/proxy/config"; List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); if (pageNumber != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("pageNumber", pageNumber)); } if (pageSize != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("pageSize", pageSize)); } if (cluster != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("cluster", cluster)); } if (environment != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("environment", environment)); } if (key != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("key", key)); } 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 getProxyConfigValidateBeforeCall(String key, Integer pageNumber, Integer pageSize, String cluster, String environment, final ApiCallback _callback) throws ApiException { // verify the required parameter 'key' is set if (key == null) { throw new ApiException("Missing the required parameter 'key' when calling getProxyConfig(Async)"); } okhttp3.Call localVarCall = getProxyConfigCall(key, pageNumber, pageSize, cluster, environment, _callback); return localVarCall; } /** * Gets Proxy config for multiple environments * Gets Proxy config for multiple environments if the Key query param is provided or gets config for a single environment if an environment query param is provided * @param key Accpets a Proxy Key. (required) * @param pageNumber PageNumber (optional) * @param pageSize PageSize (optional) * @param cluster Unique identifier for the cluster for the account (optional) * @param environment Accepts an EnvironmentID. If this is provided then the endpoint will only return config for this environment. If this is left empty then the Proxy will return config for all environments associated with the Proxy Key. (optional) * @return ProxyConfig * @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 -
401 Unauthenticated -
403 Unauthorized -
404 The specified resource was not found -
500 Internal server error -
*/ public ProxyConfig getProxyConfig(String key, Integer pageNumber, Integer pageSize, String cluster, String environment) throws ApiException { ApiResponse localVarResp = getProxyConfigWithHttpInfo(key, pageNumber, pageSize, cluster, environment); return localVarResp.getData(); } /** * Gets Proxy config for multiple environments * Gets Proxy config for multiple environments if the Key query param is provided or gets config for a single environment if an environment query param is provided * @param key Accpets a Proxy Key. (required) * @param pageNumber PageNumber (optional) * @param pageSize PageSize (optional) * @param cluster Unique identifier for the cluster for the account (optional) * @param environment Accepts an EnvironmentID. If this is provided then the endpoint will only return config for this environment. If this is left empty then the Proxy will return config for all environments associated with the Proxy Key. (optional) * @return ApiResponse<ProxyConfig> * @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 -
401 Unauthenticated -
403 Unauthorized -
404 The specified resource was not found -
500 Internal server error -
*/ public ApiResponse getProxyConfigWithHttpInfo(String key, Integer pageNumber, Integer pageSize, String cluster, String environment) throws ApiException { okhttp3.Call localVarCall = getProxyConfigValidateBeforeCall(key, pageNumber, pageSize, cluster, environment, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * Gets Proxy config for multiple environments (asynchronously) * Gets Proxy config for multiple environments if the Key query param is provided or gets config for a single environment if an environment query param is provided * @param key Accpets a Proxy Key. (required) * @param pageNumber PageNumber (optional) * @param pageSize PageSize (optional) * @param cluster Unique identifier for the cluster for the account (optional) * @param environment Accepts an EnvironmentID. If this is provided then the endpoint will only return config for this environment. If this is left empty then the Proxy will return config for all environments associated with the Proxy Key. (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 -
400 Bad request -
401 Unauthenticated -
403 Unauthorized -
404 The specified resource was not found -
500 Internal server error -
*/ public okhttp3.Call getProxyConfigAsync(String key, Integer pageNumber, Integer pageSize, String cluster, String environment, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = getProxyConfigValidateBeforeCall(key, pageNumber, pageSize, cluster, environment, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy