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

com.finbourne.identity.api.IdentityProviderApi Maven / Gradle / Ivy

There is a newer version: 2.0.130
Show newest version
/*
 * FINBOURNE Identity Service API
 *
 * 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.finbourne.identity.api;

import com.finbourne.identity.ApiCallback;
import com.finbourne.identity.ApiClient;
import com.finbourne.identity.ApiException;
import com.finbourne.identity.ApiResponse;
import com.finbourne.identity.Configuration;
import com.finbourne.identity.Pair;
import com.finbourne.identity.ProgressRequestBody;
import com.finbourne.identity.ProgressResponseBody;
import com.finbourne.identity.extensions.ConfigurationOptions;

import com.google.gson.reflect.TypeToken;

import java.io.IOException;


import com.finbourne.identity.model.AddScimResponse;
import com.finbourne.identity.model.LusidProblemDetails;
import com.finbourne.identity.model.LusidValidationProblemDetails;
import java.time.OffsetDateTime;

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

public class IdentityProviderApi {
    private ApiClient localVarApiClient;
    private int localHostIndex;
    private String localCustomBaseUrl;

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

    public IdentityProviderApi(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;
    }

    private okhttp3.Call addScimCall(String apiTokenAction, OffsetDateTime oldApiTokenDeactivation, final ApiCallback _callback) throws ApiException {
        return addScimCall(apiTokenAction, oldApiTokenDeactivation,  _callback, new ConfigurationOptions());
    }

    private okhttp3.Call addScimCall(String apiTokenAction, OffsetDateTime oldApiTokenDeactivation, final ApiCallback _callback, ConfigurationOptions opts) 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 = "/api/identityprovider/scim";

        List localVarQueryParams = new ArrayList();
        List localVarCollectionQueryParams = new ArrayList();
        Map localVarHeaderParams = new HashMap();
        Map localVarCookieParams = new HashMap();
        Map localVarFormParams = new HashMap();

        if (apiTokenAction != null) {
            localVarQueryParams.addAll(localVarApiClient.parameterToPair("apiTokenAction", apiTokenAction));
        }

        if (oldApiTokenDeactivation != null) {
            localVarQueryParams.addAll(localVarApiClient.parameterToPair("oldApiTokenDeactivation", oldApiTokenDeactivation));
        }

        final String[] localVarAccepts = {
            "text/plain",
            "application/json",
            "text/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[] { "oauth2" };
        return localVarApiClient.buildCall(basePath, localVarPath, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback, opts);
    }

    @SuppressWarnings("rawtypes")
    private okhttp3.Call addScimValidateBeforeCall(String apiTokenAction, OffsetDateTime oldApiTokenDeactivation, final ApiCallback _callback, ConfigurationOptions opts) throws ApiException {
        return addScimCall(apiTokenAction, oldApiTokenDeactivation, _callback, opts);

    }


    private ApiResponse addScimWithHttpInfo(String apiTokenAction, OffsetDateTime oldApiTokenDeactivation) throws ApiException {
        okhttp3.Call localVarCall = addScimValidateBeforeCall(apiTokenAction, oldApiTokenDeactivation, null, new ConfigurationOptions());
        Type localVarReturnType = new TypeToken(){}.getType();
        return localVarApiClient.execute(localVarCall, localVarReturnType);
    }

    private ApiResponse addScimWithHttpInfo(String apiTokenAction, OffsetDateTime oldApiTokenDeactivation, ConfigurationOptions opts) throws ApiException {
        okhttp3.Call localVarCall = addScimValidateBeforeCall(apiTokenAction, oldApiTokenDeactivation, null, opts);
        Type localVarReturnType = new TypeToken(){}.getType();
        return localVarApiClient.execute(localVarCall, localVarReturnType);
    }

    private okhttp3.Call addScimAsync(String apiTokenAction, OffsetDateTime oldApiTokenDeactivation, final ApiCallback _callback) throws ApiException {

        okhttp3.Call localVarCall = addScimValidateBeforeCall(apiTokenAction, oldApiTokenDeactivation, _callback, new ConfigurationOptions());
        Type localVarReturnType = new TypeToken(){}.getType();
        localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
        return localVarCall;
    }

    private okhttp3.Call addScimAsync(String apiTokenAction, OffsetDateTime oldApiTokenDeactivation, final ApiCallback _callback, ConfigurationOptions opts) throws ApiException {

        okhttp3.Call localVarCall = addScimValidateBeforeCall(apiTokenAction, oldApiTokenDeactivation, _callback, opts);
        Type localVarReturnType = new TypeToken(){}.getType();
        localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
        return localVarCall;
    }

    public class APIaddScimRequest {
        private String apiTokenAction;
        private OffsetDateTime oldApiTokenDeactivation;

        private APIaddScimRequest() {
        }

        /**
         * Set apiTokenAction
         * @param apiTokenAction The action to take. For the API token. Defaults to \"ensure\" (optional)
         * @return APIaddScimRequest
         */
        public APIaddScimRequest apiTokenAction(String apiTokenAction) {
            this.apiTokenAction = apiTokenAction;
            return this;
        }

        /**
         * Set oldApiTokenDeactivation
         * @param oldApiTokenDeactivation Optional deactivation date for the old API token. Only used if apiTokenAction is \"regenerate\" (optional)
         * @return APIaddScimRequest
         */
        public APIaddScimRequest oldApiTokenDeactivation(OffsetDateTime oldApiTokenDeactivation) {
            this.oldApiTokenDeactivation = oldApiTokenDeactivation;
            return this;
        }

        /**
         * Build call for addScim
         * @param _callback ApiCallback API callback
         * @return Call to execute
         * @throws ApiException If fail to serialize the request body object
         * @http.response.details
         
Status Code Description Response Headers
200 The base URL and API token to be used -
400 The details of the input related failure -
0 Error response -
*/ public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException { return addScimCall(apiTokenAction, oldApiTokenDeactivation, _callback); } /** * Execute addScim request * @return AddScimResponse * @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 The base URL and API token to be used -
400 The details of the input related failure -
0 Error response -
*/ public AddScimResponse execute() throws ApiException { ApiResponse localVarResp = addScimWithHttpInfo(apiTokenAction, oldApiTokenDeactivation); return localVarResp.getData(); } /** * Execute addScim request. Use any specified configuration options to override any other configuration for this request only. * @return AddScimResponse * @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 The base URL and API token to be used -
400 The details of the input related failure -
0 Error response -
*/ public AddScimResponse execute(ConfigurationOptions opts) throws ApiException { ApiResponse localVarResp = addScimWithHttpInfo(apiTokenAction, oldApiTokenDeactivation, opts); return localVarResp.getData(); } /** * Execute addScim request with HTTP info returned * @return ApiResponse<AddScimResponse> * @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 The base URL and API token to be used -
400 The details of the input related failure -
0 Error response -
*/ public ApiResponse executeWithHttpInfo() throws ApiException { return addScimWithHttpInfo(apiTokenAction, oldApiTokenDeactivation); } /** * Execute addScim request with HTTP info returned. Use any specified configuration options to override any other configuration for this request only. * @return ApiResponse<AddScimResponse> * @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 The base URL and API token to be used -
400 The details of the input related failure -
0 Error response -
*/ public ApiResponse executeWithHttpInfo(ConfigurationOptions opts) throws ApiException { return addScimWithHttpInfo(apiTokenAction, oldApiTokenDeactivation, opts); } /** * Execute addScim request (asynchronously) * @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 The base URL and API token to be used -
400 The details of the input related failure -
0 Error response -
*/ public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException { return addScimAsync(apiTokenAction, oldApiTokenDeactivation, _callback); } /** * Execute addScim request (asynchronously). Use any specified configuration options to override any other configuration for this request only. * @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 The base URL and API token to be used -
400 The details of the input related failure -
0 Error response -
*/ public okhttp3.Call executeAsync(final ApiCallback _callback, ConfigurationOptions opts) throws ApiException { return addScimAsync(apiTokenAction, oldApiTokenDeactivation, _callback, opts); } } /** * AddScim: Add SCIM * Generates an API token to be used for SCIM * @return APIaddScimRequest * @http.response.details
Status Code Description Response Headers
200 The base URL and API token to be used -
400 The details of the input related failure -
0 Error response -
*/ public APIaddScimRequest addScim() { return new APIaddScimRequest(); } private okhttp3.Call removeScimCall(final ApiCallback _callback) throws ApiException { return removeScimCall( _callback, new ConfigurationOptions()); } private okhttp3.Call removeScimCall(final ApiCallback _callback, ConfigurationOptions opts) 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 = "/api/identityprovider/scim"; 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[] { "oauth2" }; return localVarApiClient.buildCall(basePath, localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback, opts); } @SuppressWarnings("rawtypes") private okhttp3.Call removeScimValidateBeforeCall(final ApiCallback _callback, ConfigurationOptions opts) throws ApiException { return removeScimCall(_callback, opts); } private ApiResponse removeScimWithHttpInfo() throws ApiException { okhttp3.Call localVarCall = removeScimValidateBeforeCall(null, new ConfigurationOptions()); return localVarApiClient.execute(localVarCall); } private ApiResponse removeScimWithHttpInfo(ConfigurationOptions opts) throws ApiException { okhttp3.Call localVarCall = removeScimValidateBeforeCall(null, opts); return localVarApiClient.execute(localVarCall); } private okhttp3.Call removeScimAsync(final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = removeScimValidateBeforeCall(_callback, new ConfigurationOptions()); localVarApiClient.executeAsync(localVarCall, _callback); return localVarCall; } private okhttp3.Call removeScimAsync(final ApiCallback _callback, ConfigurationOptions opts) throws ApiException { okhttp3.Call localVarCall = removeScimValidateBeforeCall(_callback, opts); localVarApiClient.executeAsync(localVarCall, _callback); return localVarCall; } public class APIremoveScimRequest { private APIremoveScimRequest() { } /** * Build call for removeScim * @param _callback ApiCallback API callback * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details
Status Code Description Response Headers
204 No Content -
0 Error response -
*/ public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException { return removeScimCall(_callback); } /** * Execute removeScim request * @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 No Content -
0 Error response -
*/ public void execute() throws ApiException { removeScimWithHttpInfo(); } /** * Execute removeScim request * @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 No Content -
0 Error response -
*/ public void execute(ConfigurationOptions opts) throws ApiException { removeScimWithHttpInfo(opts); } /** * Execute removeScim request with HTTP info returned * @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 No Content -
0 Error response -
*/ public ApiResponse executeWithHttpInfo() throws ApiException { return removeScimWithHttpInfo(); } /** * Execute removeScim request with HTTP info returned. Use any specified configuration options to override any other configuration for this request only. * @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 No Content -
0 Error response -
*/ public ApiResponse executeWithHttpInfo(ConfigurationOptions opts) throws ApiException { return removeScimWithHttpInfo(opts); } /** * Execute removeScim request (asynchronously) * @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 No Content -
0 Error response -
*/ public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException { return removeScimAsync(_callback); } /** * Execute removeScim request (asynchronously). Use any specified configuration options to override any other configuration for this request only. * @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 No Content -
0 Error response -
*/ public okhttp3.Call executeAsync(final ApiCallback _callback, ConfigurationOptions opts) throws ApiException { return removeScimAsync(_callback, opts); } } /** * RemoveScim: Remove SCIM * Deactivates any existing SCIM API token * @return APIremoveScimRequest * @http.response.details
Status Code Description Response Headers
204 No Content -
0 Error response -
*/ public APIremoveScimRequest removeScim() { return new APIremoveScimRequest(); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy