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

com.finbourne.access.api.PolicyTemplatesApi Maven / Gradle / Ivy

The newest version!
/*
 * FINBOURNE Access Management 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.access.api;

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

import com.google.gson.reflect.TypeToken;

import java.io.IOException;


import com.finbourne.access.model.GeneratePolicyFromTemplateRequest;
import com.finbourne.access.model.GeneratedPolicyComponents;
import com.finbourne.access.model.LusidProblemDetails;
import com.finbourne.access.model.LusidValidationProblemDetails;
import java.time.OffsetDateTime;
import com.finbourne.access.model.PolicyTemplateCreationRequest;
import com.finbourne.access.model.PolicyTemplateResponse;
import com.finbourne.access.model.PolicyTemplateUpdateRequest;
import com.finbourne.access.model.ResourceListOfPolicyTemplateResponse;

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

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

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

    public PolicyTemplatesApi(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 createPolicyTemplateCall(PolicyTemplateCreationRequest policyTemplateCreationRequest, final ApiCallback _callback) throws ApiException {
        return createPolicyTemplateCall(policyTemplateCreationRequest,  _callback, new ConfigurationOptions());
    }

    private okhttp3.Call createPolicyTemplateCall(PolicyTemplateCreationRequest policyTemplateCreationRequest, 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 = policyTemplateCreationRequest;

        // create path and map variables
        String localVarPath = "/api/policytemplates";

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

        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 = {
            "application/json-patch+json",
            "application/json",
            "text/json",
            "application/*+json"
        };
        final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
        if (localVarContentType != null) {
            localVarHeaderParams.put("Content-Type", localVarContentType);
        }

        String[] localVarAuthNames = new String[] { "oauth2" };
        return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback, opts);
    }

    @SuppressWarnings("rawtypes")
    private okhttp3.Call createPolicyTemplateValidateBeforeCall(PolicyTemplateCreationRequest policyTemplateCreationRequest, final ApiCallback _callback, ConfigurationOptions opts) throws ApiException {
        // verify the required parameter 'policyTemplateCreationRequest' is set
        if (policyTemplateCreationRequest == null) {
            throw new ApiException("Missing the required parameter 'policyTemplateCreationRequest' when calling createPolicyTemplate(Async)");
        }

        return createPolicyTemplateCall(policyTemplateCreationRequest, _callback, opts);

    }


    private ApiResponse createPolicyTemplateWithHttpInfo(PolicyTemplateCreationRequest policyTemplateCreationRequest) throws ApiException {
        okhttp3.Call localVarCall = createPolicyTemplateValidateBeforeCall(policyTemplateCreationRequest, null, new ConfigurationOptions());
        Type localVarReturnType = new TypeToken(){}.getType();
        return localVarApiClient.execute(localVarCall, localVarReturnType);
    }

    private ApiResponse createPolicyTemplateWithHttpInfo(PolicyTemplateCreationRequest policyTemplateCreationRequest, ConfigurationOptions opts) throws ApiException {
        okhttp3.Call localVarCall = createPolicyTemplateValidateBeforeCall(policyTemplateCreationRequest, null, opts);
        Type localVarReturnType = new TypeToken(){}.getType();
        return localVarApiClient.execute(localVarCall, localVarReturnType);
    }

    private okhttp3.Call createPolicyTemplateAsync(PolicyTemplateCreationRequest policyTemplateCreationRequest, final ApiCallback _callback) throws ApiException {

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

    private okhttp3.Call createPolicyTemplateAsync(PolicyTemplateCreationRequest policyTemplateCreationRequest, final ApiCallback _callback, ConfigurationOptions opts) throws ApiException {

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

    public class APIcreatePolicyTemplateRequest {
        private final PolicyTemplateCreationRequest policyTemplateCreationRequest;

        private APIcreatePolicyTemplateRequest(PolicyTemplateCreationRequest policyTemplateCreationRequest) {
            this.policyTemplateCreationRequest = policyTemplateCreationRequest;
        }

        /**
         * Build call for createPolicyTemplate
         * @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
201 Created Policy Template -
400 The details of the input related failure -
0 Error response -
*/ public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException { return createPolicyTemplateCall(policyTemplateCreationRequest, _callback); } /** * Execute createPolicyTemplate request * @return PolicyTemplateResponse * @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 Created Policy Template -
400 The details of the input related failure -
0 Error response -
*/ public PolicyTemplateResponse execute() throws ApiException { ApiResponse localVarResp = createPolicyTemplateWithHttpInfo(policyTemplateCreationRequest); return localVarResp.getData(); } /** * Execute createPolicyTemplate request. Use any specified configuration options to override any other configuration for this request only. * @return PolicyTemplateResponse * @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 Created Policy Template -
400 The details of the input related failure -
0 Error response -
*/ public PolicyTemplateResponse execute(ConfigurationOptions opts) throws ApiException { ApiResponse localVarResp = createPolicyTemplateWithHttpInfo(policyTemplateCreationRequest, opts); return localVarResp.getData(); } /** * Execute createPolicyTemplate request with HTTP info returned * @return ApiResponse<PolicyTemplateResponse> * @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 Created Policy Template -
400 The details of the input related failure -
0 Error response -
*/ public ApiResponse executeWithHttpInfo() throws ApiException { return createPolicyTemplateWithHttpInfo(policyTemplateCreationRequest); } /** * Execute createPolicyTemplate request with HTTP info returned. Use any specified configuration options to override any other configuration for this request only. * @return ApiResponse<PolicyTemplateResponse> * @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 Created Policy Template -
400 The details of the input related failure -
0 Error response -
*/ public ApiResponse executeWithHttpInfo(ConfigurationOptions opts) throws ApiException { return createPolicyTemplateWithHttpInfo(policyTemplateCreationRequest, opts); } /** * Execute createPolicyTemplate 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
201 Created Policy Template -
400 The details of the input related failure -
0 Error response -
*/ public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException { return createPolicyTemplateAsync(policyTemplateCreationRequest, _callback); } /** * Execute createPolicyTemplate 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
201 Created Policy Template -
400 The details of the input related failure -
0 Error response -
*/ public okhttp3.Call executeAsync(final ApiCallback _callback, ConfigurationOptions opts) throws ApiException { return createPolicyTemplateAsync(policyTemplateCreationRequest, _callback, opts); } } /** * [EXPERIMENTAL] CreatePolicyTemplate: Create a Policy Template * Creates a Policy Template * @param policyTemplateCreationRequest The definition of the policy template (required) * @return APIcreatePolicyTemplateRequest * @http.response.details
Status Code Description Response Headers
201 Created Policy Template -
400 The details of the input related failure -
0 Error response -
*/ public APIcreatePolicyTemplateRequest createPolicyTemplate(PolicyTemplateCreationRequest policyTemplateCreationRequest) { return new APIcreatePolicyTemplateRequest(policyTemplateCreationRequest); } private okhttp3.Call deletePolicyTemplateCall(String code, String scope, final ApiCallback _callback) throws ApiException { return deletePolicyTemplateCall(code, scope, _callback, new ConfigurationOptions()); } private okhttp3.Call deletePolicyTemplateCall(String code, String scope, 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/policytemplates/{code}" .replace("{" + "code" + "}", localVarApiClient.escapeString(code.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); if (scope != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("scope", scope)); } 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, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback, opts); } @SuppressWarnings("rawtypes") private okhttp3.Call deletePolicyTemplateValidateBeforeCall(String code, String scope, final ApiCallback _callback, ConfigurationOptions opts) throws ApiException { // verify the required parameter 'code' is set if (code == null) { throw new ApiException("Missing the required parameter 'code' when calling deletePolicyTemplate(Async)"); } return deletePolicyTemplateCall(code, scope, _callback, opts); } private ApiResponse deletePolicyTemplateWithHttpInfo(String code, String scope) throws ApiException { okhttp3.Call localVarCall = deletePolicyTemplateValidateBeforeCall(code, scope, null, new ConfigurationOptions()); return localVarApiClient.execute(localVarCall); } private ApiResponse deletePolicyTemplateWithHttpInfo(String code, String scope, ConfigurationOptions opts) throws ApiException { okhttp3.Call localVarCall = deletePolicyTemplateValidateBeforeCall(code, scope, null, opts); return localVarApiClient.execute(localVarCall); } private okhttp3.Call deletePolicyTemplateAsync(String code, String scope, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = deletePolicyTemplateValidateBeforeCall(code, scope, _callback, new ConfigurationOptions()); localVarApiClient.executeAsync(localVarCall, _callback); return localVarCall; } private okhttp3.Call deletePolicyTemplateAsync(String code, String scope, final ApiCallback _callback, ConfigurationOptions opts) throws ApiException { okhttp3.Call localVarCall = deletePolicyTemplateValidateBeforeCall(code, scope, _callback, opts); localVarApiClient.executeAsync(localVarCall, _callback); return localVarCall; } public class APIdeletePolicyTemplateRequest { private final String code; private String scope; private APIdeletePolicyTemplateRequest(String code) { this.code = code; } /** * Set scope * @param scope Optional. Will use the default scope if not provided. The scope of the Policy Template (optional) * @return APIdeletePolicyTemplateRequest */ public APIdeletePolicyTemplateRequest scope(String scope) { this.scope = scope; return this; } /** * Build call for deletePolicyTemplate * @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 -
400 The details of the input related failure -
0 Error response -
*/ public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException { return deletePolicyTemplateCall(code, scope, _callback); } /** * Execute deletePolicyTemplate 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 -
400 The details of the input related failure -
0 Error response -
*/ public void execute() throws ApiException { deletePolicyTemplateWithHttpInfo(code, scope); } /** * Execute deletePolicyTemplate 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 -
400 The details of the input related failure -
0 Error response -
*/ public void execute(ConfigurationOptions opts) throws ApiException { deletePolicyTemplateWithHttpInfo(code, scope, opts); } /** * Execute deletePolicyTemplate 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 -
400 The details of the input related failure -
0 Error response -
*/ public ApiResponse executeWithHttpInfo() throws ApiException { return deletePolicyTemplateWithHttpInfo(code, scope); } /** * Execute deletePolicyTemplate 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 -
400 The details of the input related failure -
0 Error response -
*/ public ApiResponse executeWithHttpInfo(ConfigurationOptions opts) throws ApiException { return deletePolicyTemplateWithHttpInfo(code, scope, opts); } /** * Execute deletePolicyTemplate 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 -
400 The details of the input related failure -
0 Error response -
*/ public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException { return deletePolicyTemplateAsync(code, scope, _callback); } /** * Execute deletePolicyTemplate 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 -
400 The details of the input related failure -
0 Error response -
*/ public okhttp3.Call executeAsync(final ApiCallback _callback, ConfigurationOptions opts) throws ApiException { return deletePolicyTemplateAsync(code, scope, _callback, opts); } } /** * [EXPERIMENTAL] DeletePolicyTemplate: Deleting a policy template * Deletes an identified Policy Template * @param code The code of the Policy Template (required) * @return APIdeletePolicyTemplateRequest * @http.response.details
Status Code Description Response Headers
204 No Content -
400 The details of the input related failure -
0 Error response -
*/ public APIdeletePolicyTemplateRequest deletePolicyTemplate(String code) { return new APIdeletePolicyTemplateRequest(code); } private okhttp3.Call generatePolicyFromTemplateCall(GeneratePolicyFromTemplateRequest generatePolicyFromTemplateRequest, OffsetDateTime asAt, final ApiCallback _callback) throws ApiException { return generatePolicyFromTemplateCall(generatePolicyFromTemplateRequest, asAt, _callback, new ConfigurationOptions()); } private okhttp3.Call generatePolicyFromTemplateCall(GeneratePolicyFromTemplateRequest generatePolicyFromTemplateRequest, OffsetDateTime asAt, 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 = generatePolicyFromTemplateRequest; // create path and map variables String localVarPath = "/api/policytemplates/$generatepolicy"; List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); if (asAt != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("asAt", asAt)); } 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 = { "application/json-patch+json", "application/json", "text/json", "application/*+json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } String[] localVarAuthNames = new String[] { "oauth2" }; return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback, opts); } @SuppressWarnings("rawtypes") private okhttp3.Call generatePolicyFromTemplateValidateBeforeCall(GeneratePolicyFromTemplateRequest generatePolicyFromTemplateRequest, OffsetDateTime asAt, final ApiCallback _callback, ConfigurationOptions opts) throws ApiException { // verify the required parameter 'generatePolicyFromTemplateRequest' is set if (generatePolicyFromTemplateRequest == null) { throw new ApiException("Missing the required parameter 'generatePolicyFromTemplateRequest' when calling generatePolicyFromTemplate(Async)"); } return generatePolicyFromTemplateCall(generatePolicyFromTemplateRequest, asAt, _callback, opts); } private ApiResponse generatePolicyFromTemplateWithHttpInfo(GeneratePolicyFromTemplateRequest generatePolicyFromTemplateRequest, OffsetDateTime asAt) throws ApiException { okhttp3.Call localVarCall = generatePolicyFromTemplateValidateBeforeCall(generatePolicyFromTemplateRequest, asAt, null, new ConfigurationOptions()); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } private ApiResponse generatePolicyFromTemplateWithHttpInfo(GeneratePolicyFromTemplateRequest generatePolicyFromTemplateRequest, OffsetDateTime asAt, ConfigurationOptions opts) throws ApiException { okhttp3.Call localVarCall = generatePolicyFromTemplateValidateBeforeCall(generatePolicyFromTemplateRequest, asAt, null, opts); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } private okhttp3.Call generatePolicyFromTemplateAsync(GeneratePolicyFromTemplateRequest generatePolicyFromTemplateRequest, OffsetDateTime asAt, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = generatePolicyFromTemplateValidateBeforeCall(generatePolicyFromTemplateRequest, asAt, _callback, new ConfigurationOptions()); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } private okhttp3.Call generatePolicyFromTemplateAsync(GeneratePolicyFromTemplateRequest generatePolicyFromTemplateRequest, OffsetDateTime asAt, final ApiCallback _callback, ConfigurationOptions opts) throws ApiException { okhttp3.Call localVarCall = generatePolicyFromTemplateValidateBeforeCall(generatePolicyFromTemplateRequest, asAt, _callback, opts); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } public class APIgeneratePolicyFromTemplateRequest { private final GeneratePolicyFromTemplateRequest generatePolicyFromTemplateRequest; private OffsetDateTime asAt; private APIgeneratePolicyFromTemplateRequest(GeneratePolicyFromTemplateRequest generatePolicyFromTemplateRequest) { this.generatePolicyFromTemplateRequest = generatePolicyFromTemplateRequest; } /** * Set asAt * @param asAt Optional. The AsAt date time of the data (optional) * @return APIgeneratePolicyFromTemplateRequest */ public APIgeneratePolicyFromTemplateRequest asAt(OffsetDateTime asAt) { this.asAt = asAt; return this; } /** * Build call for generatePolicyFromTemplate * @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 Success -
400 The details of the input related failure -
0 Error response -
*/ public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException { return generatePolicyFromTemplateCall(generatePolicyFromTemplateRequest, asAt, _callback); } /** * Execute generatePolicyFromTemplate request * @return GeneratedPolicyComponents * @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 Success -
400 The details of the input related failure -
0 Error response -
*/ public GeneratedPolicyComponents execute() throws ApiException { ApiResponse localVarResp = generatePolicyFromTemplateWithHttpInfo(generatePolicyFromTemplateRequest, asAt); return localVarResp.getData(); } /** * Execute generatePolicyFromTemplate request. Use any specified configuration options to override any other configuration for this request only. * @return GeneratedPolicyComponents * @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 Success -
400 The details of the input related failure -
0 Error response -
*/ public GeneratedPolicyComponents execute(ConfigurationOptions opts) throws ApiException { ApiResponse localVarResp = generatePolicyFromTemplateWithHttpInfo(generatePolicyFromTemplateRequest, asAt, opts); return localVarResp.getData(); } /** * Execute generatePolicyFromTemplate request with HTTP info returned * @return ApiResponse<GeneratedPolicyComponents> * @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 Success -
400 The details of the input related failure -
0 Error response -
*/ public ApiResponse executeWithHttpInfo() throws ApiException { return generatePolicyFromTemplateWithHttpInfo(generatePolicyFromTemplateRequest, asAt); } /** * Execute generatePolicyFromTemplate request with HTTP info returned. Use any specified configuration options to override any other configuration for this request only. * @return ApiResponse<GeneratedPolicyComponents> * @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 Success -
400 The details of the input related failure -
0 Error response -
*/ public ApiResponse executeWithHttpInfo(ConfigurationOptions opts) throws ApiException { return generatePolicyFromTemplateWithHttpInfo(generatePolicyFromTemplateRequest, asAt, opts); } /** * Execute generatePolicyFromTemplate 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 Success -
400 The details of the input related failure -
0 Error response -
*/ public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException { return generatePolicyFromTemplateAsync(generatePolicyFromTemplateRequest, asAt, _callback); } /** * Execute generatePolicyFromTemplate 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 Success -
400 The details of the input related failure -
0 Error response -
*/ public okhttp3.Call executeAsync(final ApiCallback _callback, ConfigurationOptions opts) throws ApiException { return generatePolicyFromTemplateAsync(generatePolicyFromTemplateRequest, asAt, _callback, opts); } } /** * [EXPERIMENTAL] GeneratePolicyFromTemplate: Generate policy from template * Generates policies from templates * @param generatePolicyFromTemplateRequest Definition of the generate request (required) * @return APIgeneratePolicyFromTemplateRequest * @http.response.details
Status Code Description Response Headers
200 Success -
400 The details of the input related failure -
0 Error response -
*/ public APIgeneratePolicyFromTemplateRequest generatePolicyFromTemplate(GeneratePolicyFromTemplateRequest generatePolicyFromTemplateRequest) { return new APIgeneratePolicyFromTemplateRequest(generatePolicyFromTemplateRequest); } private okhttp3.Call getPolicyTemplateCall(String code, OffsetDateTime asAt, String scope, final ApiCallback _callback) throws ApiException { return getPolicyTemplateCall(code, asAt, scope, _callback, new ConfigurationOptions()); } private okhttp3.Call getPolicyTemplateCall(String code, OffsetDateTime asAt, String scope, 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/policytemplates/{code}" .replace("{" + "code" + "}", localVarApiClient.escapeString(code.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); if (asAt != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("asAt", asAt)); } if (scope != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("scope", scope)); } 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, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback, opts); } @SuppressWarnings("rawtypes") private okhttp3.Call getPolicyTemplateValidateBeforeCall(String code, OffsetDateTime asAt, String scope, final ApiCallback _callback, ConfigurationOptions opts) throws ApiException { // verify the required parameter 'code' is set if (code == null) { throw new ApiException("Missing the required parameter 'code' when calling getPolicyTemplate(Async)"); } return getPolicyTemplateCall(code, asAt, scope, _callback, opts); } private ApiResponse getPolicyTemplateWithHttpInfo(String code, OffsetDateTime asAt, String scope) throws ApiException { okhttp3.Call localVarCall = getPolicyTemplateValidateBeforeCall(code, asAt, scope, null, new ConfigurationOptions()); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } private ApiResponse getPolicyTemplateWithHttpInfo(String code, OffsetDateTime asAt, String scope, ConfigurationOptions opts) throws ApiException { okhttp3.Call localVarCall = getPolicyTemplateValidateBeforeCall(code, asAt, scope, null, opts); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } private okhttp3.Call getPolicyTemplateAsync(String code, OffsetDateTime asAt, String scope, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = getPolicyTemplateValidateBeforeCall(code, asAt, scope, _callback, new ConfigurationOptions()); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } private okhttp3.Call getPolicyTemplateAsync(String code, OffsetDateTime asAt, String scope, final ApiCallback _callback, ConfigurationOptions opts) throws ApiException { okhttp3.Call localVarCall = getPolicyTemplateValidateBeforeCall(code, asAt, scope, _callback, opts); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } public class APIgetPolicyTemplateRequest { private final String code; private OffsetDateTime asAt; private String scope; private APIgetPolicyTemplateRequest(String code) { this.code = code; } /** * Set asAt * @param asAt Optional. The AsAt date time of the data. If not specified defaults to current time (optional) * @return APIgetPolicyTemplateRequest */ public APIgetPolicyTemplateRequest asAt(OffsetDateTime asAt) { this.asAt = asAt; return this; } /** * Set scope * @param scope Optional. Will use the default scope if not provided. The scope of the Policy Template (optional) * @return APIgetPolicyTemplateRequest */ public APIgetPolicyTemplateRequest scope(String scope) { this.scope = scope; return this; } /** * Build call for getPolicyTemplate * @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 Get a specific Policy Template -
400 The details of the input related failure -
0 Error response -
*/ public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException { return getPolicyTemplateCall(code, asAt, scope, _callback); } /** * Execute getPolicyTemplate request * @return PolicyTemplateResponse * @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 Get a specific Policy Template -
400 The details of the input related failure -
0 Error response -
*/ public PolicyTemplateResponse execute() throws ApiException { ApiResponse localVarResp = getPolicyTemplateWithHttpInfo(code, asAt, scope); return localVarResp.getData(); } /** * Execute getPolicyTemplate request. Use any specified configuration options to override any other configuration for this request only. * @return PolicyTemplateResponse * @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 Get a specific Policy Template -
400 The details of the input related failure -
0 Error response -
*/ public PolicyTemplateResponse execute(ConfigurationOptions opts) throws ApiException { ApiResponse localVarResp = getPolicyTemplateWithHttpInfo(code, asAt, scope, opts); return localVarResp.getData(); } /** * Execute getPolicyTemplate request with HTTP info returned * @return ApiResponse<PolicyTemplateResponse> * @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 Get a specific Policy Template -
400 The details of the input related failure -
0 Error response -
*/ public ApiResponse executeWithHttpInfo() throws ApiException { return getPolicyTemplateWithHttpInfo(code, asAt, scope); } /** * Execute getPolicyTemplate request with HTTP info returned. Use any specified configuration options to override any other configuration for this request only. * @return ApiResponse<PolicyTemplateResponse> * @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 Get a specific Policy Template -
400 The details of the input related failure -
0 Error response -
*/ public ApiResponse executeWithHttpInfo(ConfigurationOptions opts) throws ApiException { return getPolicyTemplateWithHttpInfo(code, asAt, scope, opts); } /** * Execute getPolicyTemplate 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 Get a specific Policy Template -
400 The details of the input related failure -
0 Error response -
*/ public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException { return getPolicyTemplateAsync(code, asAt, scope, _callback); } /** * Execute getPolicyTemplate 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 Get a specific Policy Template -
400 The details of the input related failure -
0 Error response -
*/ public okhttp3.Call executeAsync(final ApiCallback _callback, ConfigurationOptions opts) throws ApiException { return getPolicyTemplateAsync(code, asAt, scope, _callback, opts); } } /** * [EXPERIMENTAL] GetPolicyTemplate: Retrieving one Policy Template * Gets an identified Policy Template * @param code The code of the Policy Template (required) * @return APIgetPolicyTemplateRequest * @http.response.details
Status Code Description Response Headers
200 Get a specific Policy Template -
400 The details of the input related failure -
0 Error response -
*/ public APIgetPolicyTemplateRequest getPolicyTemplate(String code) { return new APIgetPolicyTemplateRequest(code); } private okhttp3.Call listPolicyTemplatesCall(OffsetDateTime asAt, String sortBy, Integer limit, String filter, String page, final ApiCallback _callback) throws ApiException { return listPolicyTemplatesCall(asAt, sortBy, limit, filter, page, _callback, new ConfigurationOptions()); } private okhttp3.Call listPolicyTemplatesCall(OffsetDateTime asAt, String sortBy, Integer limit, String filter, String page, 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/policytemplates"; List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); if (asAt != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("asAt", asAt)); } if (sortBy != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("sortBy", sortBy)); } if (limit != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("limit", limit)); } if (filter != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("filter", filter)); } if (page != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("page", page)); } 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, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback, opts); } @SuppressWarnings("rawtypes") private okhttp3.Call listPolicyTemplatesValidateBeforeCall(OffsetDateTime asAt, String sortBy, Integer limit, String filter, String page, final ApiCallback _callback, ConfigurationOptions opts) throws ApiException { return listPolicyTemplatesCall(asAt, sortBy, limit, filter, page, _callback, opts); } private ApiResponse listPolicyTemplatesWithHttpInfo(OffsetDateTime asAt, String sortBy, Integer limit, String filter, String page) throws ApiException { okhttp3.Call localVarCall = listPolicyTemplatesValidateBeforeCall(asAt, sortBy, limit, filter, page, null, new ConfigurationOptions()); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } private ApiResponse listPolicyTemplatesWithHttpInfo(OffsetDateTime asAt, String sortBy, Integer limit, String filter, String page, ConfigurationOptions opts) throws ApiException { okhttp3.Call localVarCall = listPolicyTemplatesValidateBeforeCall(asAt, sortBy, limit, filter, page, null, opts); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } private okhttp3.Call listPolicyTemplatesAsync(OffsetDateTime asAt, String sortBy, Integer limit, String filter, String page, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = listPolicyTemplatesValidateBeforeCall(asAt, sortBy, limit, filter, page, _callback, new ConfigurationOptions()); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } private okhttp3.Call listPolicyTemplatesAsync(OffsetDateTime asAt, String sortBy, Integer limit, String filter, String page, final ApiCallback _callback, ConfigurationOptions opts) throws ApiException { okhttp3.Call localVarCall = listPolicyTemplatesValidateBeforeCall(asAt, sortBy, limit, filter, page, _callback, opts); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } public class APIlistPolicyTemplatesRequest { private OffsetDateTime asAt; private String sortBy; private Integer limit; private String filter; private String page; private APIlistPolicyTemplatesRequest() { } /** * Set asAt * @param asAt Optional. The AsAt date time of the data (optional) * @return APIlistPolicyTemplatesRequest */ public APIlistPolicyTemplatesRequest asAt(OffsetDateTime asAt) { this.asAt = asAt; return this; } /** * Set sortBy * @param sortBy Optional. Order the results by these fields. Use use the '-' sign to denote descending order e.g. -MyFieldName (optional) * @return APIlistPolicyTemplatesRequest */ public APIlistPolicyTemplatesRequest sortBy(String sortBy) { this.sortBy = sortBy; return this; } /** * Set limit * @param limit Optional. When paginating, limit the number of returned results to this many. (optional) * @return APIlistPolicyTemplatesRequest */ public APIlistPolicyTemplatesRequest limit(Integer limit) { this.limit = limit; return this; } /** * Set filter * @param filter Optional. Expression to filter the result set (optional) * @return APIlistPolicyTemplatesRequest */ public APIlistPolicyTemplatesRequest filter(String filter) { this.filter = filter; return this; } /** * Set page * @param page Optional. Paging token returned from a previous result (optional) * @return APIlistPolicyTemplatesRequest */ public APIlistPolicyTemplatesRequest page(String page) { this.page = page; return this; } /** * Build call for listPolicyTemplates * @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 List Policy Templates -
400 The details of the input related failure -
0 Error response -
*/ public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException { return listPolicyTemplatesCall(asAt, sortBy, limit, filter, page, _callback); } /** * Execute listPolicyTemplates request * @return ResourceListOfPolicyTemplateResponse * @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 List Policy Templates -
400 The details of the input related failure -
0 Error response -
*/ public ResourceListOfPolicyTemplateResponse execute() throws ApiException { ApiResponse localVarResp = listPolicyTemplatesWithHttpInfo(asAt, sortBy, limit, filter, page); return localVarResp.getData(); } /** * Execute listPolicyTemplates request. Use any specified configuration options to override any other configuration for this request only. * @return ResourceListOfPolicyTemplateResponse * @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 List Policy Templates -
400 The details of the input related failure -
0 Error response -
*/ public ResourceListOfPolicyTemplateResponse execute(ConfigurationOptions opts) throws ApiException { ApiResponse localVarResp = listPolicyTemplatesWithHttpInfo(asAt, sortBy, limit, filter, page, opts); return localVarResp.getData(); } /** * Execute listPolicyTemplates request with HTTP info returned * @return ApiResponse<ResourceListOfPolicyTemplateResponse> * @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 List Policy Templates -
400 The details of the input related failure -
0 Error response -
*/ public ApiResponse executeWithHttpInfo() throws ApiException { return listPolicyTemplatesWithHttpInfo(asAt, sortBy, limit, filter, page); } /** * Execute listPolicyTemplates request with HTTP info returned. Use any specified configuration options to override any other configuration for this request only. * @return ApiResponse<ResourceListOfPolicyTemplateResponse> * @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 List Policy Templates -
400 The details of the input related failure -
0 Error response -
*/ public ApiResponse executeWithHttpInfo(ConfigurationOptions opts) throws ApiException { return listPolicyTemplatesWithHttpInfo(asAt, sortBy, limit, filter, page, opts); } /** * Execute listPolicyTemplates 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 List Policy Templates -
400 The details of the input related failure -
0 Error response -
*/ public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException { return listPolicyTemplatesAsync(asAt, sortBy, limit, filter, page, _callback); } /** * Execute listPolicyTemplates 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 List Policy Templates -
400 The details of the input related failure -
0 Error response -
*/ public okhttp3.Call executeAsync(final ApiCallback _callback, ConfigurationOptions opts) throws ApiException { return listPolicyTemplatesAsync(asAt, sortBy, limit, filter, page, _callback, opts); } } /** * [EXPERIMENTAL] ListPolicyTemplates: List Policy Templates * Gets all Policy Templates with pagination support. * @return APIlistPolicyTemplatesRequest * @http.response.details
Status Code Description Response Headers
200 List Policy Templates -
400 The details of the input related failure -
0 Error response -
*/ public APIlistPolicyTemplatesRequest listPolicyTemplates() { return new APIlistPolicyTemplatesRequest(); } private okhttp3.Call updatePolicyTemplateCall(String code, PolicyTemplateUpdateRequest policyTemplateUpdateRequest, final ApiCallback _callback) throws ApiException { return updatePolicyTemplateCall(code, policyTemplateUpdateRequest, _callback, new ConfigurationOptions()); } private okhttp3.Call updatePolicyTemplateCall(String code, PolicyTemplateUpdateRequest policyTemplateUpdateRequest, 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 = policyTemplateUpdateRequest; // create path and map variables String localVarPath = "/api/policytemplates/{code}" .replace("{" + "code" + "}", localVarApiClient.escapeString(code.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); 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 = { "application/json-patch+json", "application/json", "text/json", "application/*+json" }; 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 updatePolicyTemplateValidateBeforeCall(String code, PolicyTemplateUpdateRequest policyTemplateUpdateRequest, final ApiCallback _callback, ConfigurationOptions opts) throws ApiException { // verify the required parameter 'code' is set if (code == null) { throw new ApiException("Missing the required parameter 'code' when calling updatePolicyTemplate(Async)"); } return updatePolicyTemplateCall(code, policyTemplateUpdateRequest, _callback, opts); } private ApiResponse updatePolicyTemplateWithHttpInfo(String code, PolicyTemplateUpdateRequest policyTemplateUpdateRequest) throws ApiException { okhttp3.Call localVarCall = updatePolicyTemplateValidateBeforeCall(code, policyTemplateUpdateRequest, null, new ConfigurationOptions()); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } private ApiResponse updatePolicyTemplateWithHttpInfo(String code, PolicyTemplateUpdateRequest policyTemplateUpdateRequest, ConfigurationOptions opts) throws ApiException { okhttp3.Call localVarCall = updatePolicyTemplateValidateBeforeCall(code, policyTemplateUpdateRequest, null, opts); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } private okhttp3.Call updatePolicyTemplateAsync(String code, PolicyTemplateUpdateRequest policyTemplateUpdateRequest, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = updatePolicyTemplateValidateBeforeCall(code, policyTemplateUpdateRequest, _callback, new ConfigurationOptions()); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } private okhttp3.Call updatePolicyTemplateAsync(String code, PolicyTemplateUpdateRequest policyTemplateUpdateRequest, final ApiCallback _callback, ConfigurationOptions opts) throws ApiException { okhttp3.Call localVarCall = updatePolicyTemplateValidateBeforeCall(code, policyTemplateUpdateRequest, _callback, opts); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } public class APIupdatePolicyTemplateRequest { private final String code; private PolicyTemplateUpdateRequest policyTemplateUpdateRequest; private APIupdatePolicyTemplateRequest(String code) { this.code = code; } /** * Set policyTemplateUpdateRequest * @param policyTemplateUpdateRequest Definition of the updated policy template (optional) * @return APIupdatePolicyTemplateRequest */ public APIupdatePolicyTemplateRequest policyTemplateUpdateRequest(PolicyTemplateUpdateRequest policyTemplateUpdateRequest) { this.policyTemplateUpdateRequest = policyTemplateUpdateRequest; return this; } /** * Build call for updatePolicyTemplate * @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 Updated Policy Template -
400 The details of the input related failure -
0 Error response -
*/ public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException { return updatePolicyTemplateCall(code, policyTemplateUpdateRequest, _callback); } /** * Execute updatePolicyTemplate request * @return PolicyTemplateResponse * @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 Updated Policy Template -
400 The details of the input related failure -
0 Error response -
*/ public PolicyTemplateResponse execute() throws ApiException { ApiResponse localVarResp = updatePolicyTemplateWithHttpInfo(code, policyTemplateUpdateRequest); return localVarResp.getData(); } /** * Execute updatePolicyTemplate request. Use any specified configuration options to override any other configuration for this request only. * @return PolicyTemplateResponse * @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 Updated Policy Template -
400 The details of the input related failure -
0 Error response -
*/ public PolicyTemplateResponse execute(ConfigurationOptions opts) throws ApiException { ApiResponse localVarResp = updatePolicyTemplateWithHttpInfo(code, policyTemplateUpdateRequest, opts); return localVarResp.getData(); } /** * Execute updatePolicyTemplate request with HTTP info returned * @return ApiResponse<PolicyTemplateResponse> * @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 Updated Policy Template -
400 The details of the input related failure -
0 Error response -
*/ public ApiResponse executeWithHttpInfo() throws ApiException { return updatePolicyTemplateWithHttpInfo(code, policyTemplateUpdateRequest); } /** * Execute updatePolicyTemplate request with HTTP info returned. Use any specified configuration options to override any other configuration for this request only. * @return ApiResponse<PolicyTemplateResponse> * @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 Updated Policy Template -
400 The details of the input related failure -
0 Error response -
*/ public ApiResponse executeWithHttpInfo(ConfigurationOptions opts) throws ApiException { return updatePolicyTemplateWithHttpInfo(code, policyTemplateUpdateRequest, opts); } /** * Execute updatePolicyTemplate 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 Updated Policy Template -
400 The details of the input related failure -
0 Error response -
*/ public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException { return updatePolicyTemplateAsync(code, policyTemplateUpdateRequest, _callback); } /** * Execute updatePolicyTemplate 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 Updated Policy Template -
400 The details of the input related failure -
0 Error response -
*/ public okhttp3.Call executeAsync(final ApiCallback _callback, ConfigurationOptions opts) throws ApiException { return updatePolicyTemplateAsync(code, policyTemplateUpdateRequest, _callback, opts); } } /** * [EXPERIMENTAL] UpdatePolicyTemplate: Update a Policy Template * Updates an identified Policy Template * @param code Code of the policy template to update (required) * @return APIupdatePolicyTemplateRequest * @http.response.details
Status Code Description Response Headers
200 Updated Policy Template -
400 The details of the input related failure -
0 Error response -
*/ public APIupdatePolicyTemplateRequest updatePolicyTemplate(String code) { return new APIupdatePolicyTemplateRequest(code); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy