content: /*
   * IotaService
   * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
   *
   * The version of the OpenAPI document: 1.0.0
   * Contact: info@affinidi.com
   *
   * 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.affinidi.tdk.iota.client.apis;
  
  import com.fasterxml.jackson.core.type.TypeReference;
  
  import com.affinidi.tdk.iota.client.ApiException;
  import com.affinidi.tdk.iota.client.ApiClient;
  import com.affinidi.tdk.iota.client.BaseApi;
  import com.affinidi.tdk.iota.client.Configuration;
  import com.affinidi.tdk.iota.client.Pair;
  
  import com.affinidi.tdk.iota.client.models.AwsExchangeCredentials;
  import com.affinidi.tdk.iota.client.models.AwsExchangeCredentialsOK;
  import com.affinidi.tdk.iota.client.models.AwsExchangeCredentialsProjectToken;
  import com.affinidi.tdk.iota.client.models.FetchIOTAVPResponseInput;
  import com.affinidi.tdk.iota.client.models.FetchIOTAVPResponseOK;
  import com.affinidi.tdk.iota.client.models.InitiateDataSharingRequestInput;
  import com.affinidi.tdk.iota.client.models.InitiateDataSharingRequestOK;
  import com.affinidi.tdk.iota.client.models.InvalidParameterError;
  import com.affinidi.tdk.iota.client.models.IotaExchangeCredentials;
  import com.affinidi.tdk.iota.client.models.IotaExchangeCredentialsOK;
  import com.affinidi.tdk.iota.client.models.NotFoundError;
  import com.affinidi.tdk.iota.client.models.OperationForbiddenError;
  
  
  import java.util.ArrayList;
  import java.util.Collections;
  import java.util.HashMap;
  import java.util.List;
  import java.util.Map;
  import java.util.StringJoiner;
  
  @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.13.0")
  public class IotaApi extends BaseApi {
  
    public IotaApi() {
      super(Configuration.getDefaultApiClient());
    }
  
    public IotaApi(ApiClient apiClient) {
      super(apiClient);
    }
  
    /**
     * 
     * Exchange a limited-scoped token into a Cognito credential to generate the identity credential. The identity credential initiates the secure WebSocket connection from the client. This method is used only in WebSocket data-sharing mode.
     * @param awsExchangeCredentials AwsExchangeCredentials (required)
     * @return AwsExchangeCredentialsOK
     * @throws ApiException if fails to make API call
     */
    public AwsExchangeCredentialsOK awsExchangeCredentials(@javax.annotation.Nonnull AwsExchangeCredentials awsExchangeCredentials) throws ApiException {
      return this.awsExchangeCredentials(awsExchangeCredentials, Collections.emptyMap());
    }
  
  
    /**
     * 
     * Exchange a limited-scoped token into a Cognito credential to generate the identity credential. The identity credential initiates the secure WebSocket connection from the client. This method is used only in WebSocket data-sharing mode.
     * @param awsExchangeCredentials AwsExchangeCredentials (required)
     * @param additionalHeaders additionalHeaders for this call
     * @return AwsExchangeCredentialsOK
     * @throws ApiException if fails to make API call
     */
    public AwsExchangeCredentialsOK awsExchangeCredentials(@javax.annotation.Nonnull AwsExchangeCredentials awsExchangeCredentials, Map<String, String> additionalHeaders) throws ApiException {
      Object localVarPostBody = awsExchangeCredentials;
      
      // verify the required parameter 'awsExchangeCredentials' is set
      if (awsExchangeCredentials == null) {
        throw new ApiException(400, "Missing the required parameter 'awsExchangeCredentials' when calling awsExchangeCredentials");
      }
      
      // create path and map variables
      String localVarPath = "/v1/aws-exchange-credentials";
  
      StringJoiner localVarQueryStringJoiner = new StringJoiner("&");
      String localVarQueryParameterBaseName;
      List<Pair> localVarQueryParams = new ArrayList<Pair>();
      List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>();
      Map<String, String> localVarHeaderParams = new HashMap<String, String>();
      Map<String, String> localVarCookieParams = new HashMap<String, String>();
      Map<String, Object> localVarFormParams = new HashMap<String, Object>();
  
      
      localVarHeaderParams.putAll(additionalHeaders);
  
      
      
      final String[] localVarAccepts = {
        "application/json"
      };
      final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
  
      final String[] localVarContentTypes = {
        "application/json"
      };
      final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
  
      String[] localVarAuthNames = new String[] {  };
  
      TypeReference<AwsExchangeCredentialsOK> localVarReturnType = new TypeReference<AwsExchangeCredentialsOK>() {};
      return apiClient.invokeAPI(
          localVarPath,
          "POST",
          localVarQueryParams,
          localVarCollectionQueryParams,
          localVarQueryStringJoiner.toString(),
          localVarPostBody,
          localVarHeaderParams,
          localVarCookieParams,
          localVarFormParams,
          localVarAccept,
          localVarContentType,
          localVarAuthNames,
          localVarReturnType
      );
    }
  
    /**
     * 
     * Exchange a Project Scoped Token into an identity credential directly to initiate a secure WebSocket connection. This method is used only in WebSocket data-sharing mode.
     * @param awsExchangeCredentialsProjectToken AwsExchangeCredentialsProjectToken (required)
     * @return IotaExchangeCredentialsOK
     * @throws ApiException if fails to make API call
     */
    public IotaExchangeCredentialsOK awsExchangeCredentialsProjectToken(@javax.annotation.Nonnull AwsExchangeCredentialsProjectToken awsExchangeCredentialsProjectToken) throws ApiException {
      return this.awsExchangeCredentialsProjectToken(awsExchangeCredentialsProjectToken, Collections.emptyMap());
    }
  
  
    /**
     * 
     * Exchange a Project Scoped Token into an identity credential directly to initiate a secure WebSocket connection. This method is used only in WebSocket data-sharing mode.
     * @param awsExchangeCredentialsProjectToken AwsExchangeCredentialsProjectToken (required)
     * @param additionalHeaders additionalHeaders for this call
     * @return IotaExchangeCredentialsOK
     * @throws ApiException if fails to make API call
     */
    public IotaExchangeCredentialsOK awsExchangeCredentialsProjectToken(@javax.annotation.Nonnull AwsExchangeCredentialsProjectToken awsExchangeCredentialsProjectToken, Map<String, String> additionalHeaders) throws ApiException {
      Object localVarPostBody = awsExchangeCredentialsProjectToken;
      
      // verify the required parameter 'awsExchangeCredentialsProjectToken' is set
      if (awsExchangeCredentialsProjectToken == null) {
        throw new ApiException(400, "Missing the required parameter 'awsExchangeCredentialsProjectToken' when calling awsExchangeCredentialsProjectToken");
      }
      
      // create path and map variables
      String localVarPath = "/v1/aws-exchange-credentials/project-token";
  
      StringJoiner localVarQueryStringJoiner = new StringJoiner("&");
      String localVarQueryParameterBaseName;
      List<Pair> localVarQueryParams = new ArrayList<Pair>();
      List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>();
      Map<String, String> localVarHeaderParams = new HashMap<String, String>();
      Map<String, String> localVarCookieParams = new HashMap<String, String>();
      Map<String, Object> localVarFormParams = new HashMap<String, Object>();
  
      
      localVarHeaderParams.putAll(additionalHeaders);
  
      
      
      final String[] localVarAccepts = {
        "application/json"
      };
      final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
  
      final String[] localVarContentTypes = {
        "application/json"
      };
      final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
  
      String[] localVarAuthNames = new String[] { "ProjectTokenAuth" };
  
      TypeReference<IotaExchangeCredentialsOK> localVarReturnType = new TypeReference<IotaExchangeCredentialsOK>() {};
      return apiClient.invokeAPI(
          localVarPath,
          "POST",
          localVarQueryParams,
          localVarCollectionQueryParams,
          localVarQueryStringJoiner.toString(),
          localVarPostBody,
          localVarHeaderParams,
          localVarCookieParams,
          localVarFormParams,
          localVarAccept,
          localVarContentType,
          localVarAuthNames,
          localVarReturnType
      );
    }
  
    /**
     * 
     * Fetches the client&#39;s callback that contains the user&#39;s shared data in a Verifiable Presentation format after a successful data-sharing flow.
     * @param fetchIOTAVPResponseInput FetchIOTAVPResponseInput (required)
     * @return FetchIOTAVPResponseOK
     * @throws ApiException if fails to make API call
     */
    public FetchIOTAVPResponseOK fetchIotaVpResponse(@javax.annotation.Nonnull FetchIOTAVPResponseInput fetchIOTAVPResponseInput) throws ApiException {
      return this.fetchIotaVpResponse(fetchIOTAVPResponseInput, Collections.emptyMap());
    }
  
  
    /**
     * 
     * Fetches the client&#39;s callback that contains the user&#39;s shared data in a Verifiable Presentation format after a successful data-sharing flow.
     * @param fetchIOTAVPResponseInput FetchIOTAVPResponseInput (required)
     * @param additionalHeaders additionalHeaders for this call
     * @return FetchIOTAVPResponseOK
     * @throws ApiException if fails to make API call
     */
    public FetchIOTAVPResponseOK fetchIotaVpResponse(@javax.annotation.Nonnull FetchIOTAVPResponseInput fetchIOTAVPResponseInput, Map<String, String> additionalHeaders) throws ApiException {
      Object localVarPostBody = fetchIOTAVPResponseInput;
      
      // verify the required parameter 'fetchIOTAVPResponseInput' is set
      if (fetchIOTAVPResponseInput == null) {
        throw new ApiException(400, "Missing the required parameter 'fetchIOTAVPResponseInput' when calling fetchIotaVpResponse");
      }
      
      // create path and map variables
      String localVarPath = "/v1/fetch-iota-response";
  
      StringJoiner localVarQueryStringJoiner = new StringJoiner("&");
      String localVarQueryParameterBaseName;
      List<Pair> localVarQueryParams = new ArrayList<Pair>();
      List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>();
      Map<String, String> localVarHeaderParams = new HashMap<String, String>();
      Map<String, String> localVarCookieParams = new HashMap<String, String>();
      Map<String, Object> localVarFormParams = new HashMap<String, Object>();
  
      
      localVarHeaderParams.putAll(additionalHeaders);
  
      
      
      final String[] localVarAccepts = {
        "application/json"
      };
      final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
  
      final String[] localVarContentTypes = {
        "application/json"
      };
      final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
  
      String[] localVarAuthNames = new String[] { "ProjectTokenAuth" };
  
      TypeReference<FetchIOTAVPResponseOK> localVarReturnType = new TypeReference<FetchIOTAVPResponseOK>() {};
      return apiClient.invokeAPI(
          localVarPath,
          "POST",
          localVarQueryParams,
          localVarCollectionQueryParams,
          localVarQueryStringJoiner.toString(),
          localVarPostBody,
          localVarHeaderParams,
          localVarCookieParams,
          localVarFormParams,
          localVarAccept,
          localVarContentType,
          localVarAuthNames,
          localVarReturnType
      );
    }
  
    /**
     * 
     * Generates the request token for the Redirect mode to initiate the data-sharing flow.
     * @param initiateDataSharingRequestInput InitiateDataSharingRequestInput (required)
     * @return InitiateDataSharingRequestOK
     * @throws ApiException if fails to make API call
     */
    public InitiateDataSharingRequestOK initiateDataSharingRequest(@javax.annotation.Nonnull InitiateDataSharingRequestInput initiateDataSharingRequestInput) throws ApiException {
      return this.initiateDataSharingRequest(initiateDataSharingRequestInput, Collections.emptyMap());
    }
  
  
    /**
     * 
     * Generates the request token for the Redirect mode to initiate the data-sharing flow.
     * @param initiateDataSharingRequestInput InitiateDataSharingRequestInput (required)
     * @param additionalHeaders additionalHeaders for this call
     * @return InitiateDataSharingRequestOK
     * @throws ApiException if fails to make API call
     */
    public InitiateDataSharingRequestOK initiateDataSharingRequest(@javax.annotation.Nonnull InitiateDataSharingRequestInput initiateDataSharingRequestInput, Map<String, String> additionalHeaders) throws ApiException {
      Object localVarPostBody = initiateDataSharingRequestInput;
      
      // verify the required parameter 'initiateDataSharingRequestInput' is set
      if (initiateDataSharingRequestInput == null) {
        throw new ApiException(400, "Missing the required parameter 'initiateDataSharingRequestInput' when calling initiateDataSharingRequest");
      }
      
      // create path and map variables
      String localVarPath = "/v1/initiate-data-sharing-request";
  
      StringJoiner localVarQueryStringJoiner = new StringJoiner("&");
      String localVarQueryParameterBaseName;
      List<Pair> localVarQueryParams = new ArrayList<Pair>();
      List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>();
      Map<String, String> localVarHeaderParams = new HashMap<String, String>();
      Map<String, String> localVarCookieParams = new HashMap<String, String>();
      Map<String, Object> localVarFormParams = new HashMap<String, Object>();
  
      
      localVarHeaderParams.putAll(additionalHeaders);
  
      
      
      final String[] localVarAccepts = {
        "application/json"
      };
      final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
  
      final String[] localVarContentTypes = {
        "application/json"
      };
      final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
  
      String[] localVarAuthNames = new String[] { "ProjectTokenAuth" };
  
      TypeReference<InitiateDataSharingRequestOK> localVarReturnType = new TypeReference<InitiateDataSharingRequestOK>() {};
      return apiClient.invokeAPI(
          localVarPath,
          "POST",
          localVarQueryParams,
          localVarCollectionQueryParams,
          localVarQueryStringJoiner.toString(),
          localVarPostBody,
          localVarHeaderParams,
          localVarCookieParams,
          localVarFormParams,
          localVarAccept,
          localVarContentType,
          localVarAuthNames,
          localVarReturnType
      );
    }
  
    /**
     * 
     * Exchange a limited-scoped token into an identity credential directly to initiate a secure WebSocket connection. This method is used only in WebSocket data-sharing mode.
     * @param iotaExchangeCredentials IotaAwsExchangeCredentials (required)
     * @return IotaExchangeCredentialsOK
     * @throws ApiException if fails to make API call
     */
    public IotaExchangeCredentialsOK iotaExchangeCredentials(@javax.annotation.Nonnull IotaExchangeCredentials iotaExchangeCredentials) throws ApiException {
      return this.iotaExchangeCredentials(iotaExchangeCredentials, Collections.emptyMap());
    }
  
  
    /**
     * 
     * Exchange a limited-scoped token into an identity credential directly to initiate a secure WebSocket connection. This method is used only in WebSocket data-sharing mode.
     * @param iotaExchangeCredentials IotaAwsExchangeCredentials (required)
     * @param additionalHeaders additionalHeaders for this call
     * @return IotaExchangeCredentialsOK
     * @throws ApiException if fails to make API call
     */
    public IotaExchangeCredentialsOK iotaExchangeCredentials(@javax.annotation.Nonnull IotaExchangeCredentials iotaExchangeCredentials, Map<String, String> additionalHeaders) throws ApiException {
      Object localVarPostBody = iotaExchangeCredentials;
      
      // verify the required parameter 'iotaExchangeCredentials' is set
      if (iotaExchangeCredentials == null) {
        throw new ApiException(400, "Missing the required parameter 'iotaExchangeCredentials' when calling iotaExchangeCredentials");
      }
      
      // create path and map variables
      String localVarPath = "/v1/exchange-credentials";
  
      StringJoiner localVarQueryStringJoiner = new StringJoiner("&");
      String localVarQueryParameterBaseName;
      List<Pair> localVarQueryParams = new ArrayList<Pair>();
      List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>();
      Map<String, String> localVarHeaderParams = new HashMap<String, String>();
      Map<String, String> localVarCookieParams = new HashMap<String, String>();
      Map<String, Object> localVarFormParams = new HashMap<String, Object>();
  
      
      localVarHeaderParams.putAll(additionalHeaders);
  
      
      
      final String[] localVarAccepts = {
        "application/json"
      };
      final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
  
      final String[] localVarContentTypes = {
        "application/json"
      };
      final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
  
      String[] localVarAuthNames = new String[] {  };
  
      TypeReference<IotaExchangeCredentialsOK> localVarReturnType = new TypeReference<IotaExchangeCredentialsOK>() {};
      return apiClient.invokeAPI(
          localVarPath,
          "POST",
          localVarQueryParams,
          localVarCollectionQueryParams,
          localVarQueryStringJoiner.toString(),
          localVarPostBody,
          localVarHeaderParams,
          localVarCookieParams,
          localVarFormParams,
          localVarAccept,
          localVarContentType,
          localVarAuthNames,
          localVarReturnType
      );
    }
  
    @Override
    public <T> T invokeAPI(String url, String method, Object request, TypeReference<T> returnType, Map<String, String> additionalHeaders) throws ApiException {
      String localVarPath = url.replace(apiClient.getBaseURL(), "");
      StringJoiner localVarQueryStringJoiner = new StringJoiner("&");
      List<Pair> localVarQueryParams = new ArrayList<Pair>();
      List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>();
      Map<String, String> localVarHeaderParams = new HashMap<String, String>();
      Map<String, String> localVarCookieParams = new HashMap<String, String>();
      Map<String, Object> localVarFormParams = new HashMap<String, Object>();
  
      localVarHeaderParams.putAll(additionalHeaders);
  
      final String[] localVarAccepts = {
        "application/json"
      };
      final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
  
      final String[] localVarContentTypes = {
        "application/json"
      };
      final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
  
      String[] localVarAuthNames = new String[] {  };
  
      return apiClient.invokeAPI(
        localVarPath,
          method,
          localVarQueryParams,
          localVarCollectionQueryParams,
          localVarQueryStringJoiner.toString(),
          request,
          localVarHeaderParams,
          localVarCookieParams,
          localVarFormParams,
          localVarAccept,
          localVarContentType,
          localVarAuthNames,
          returnType
      );
    }
  }
  