=begin
#NSX API

#VMware NSX REST API

OpenAPI spec version: 1.0.0

Generated by: https://github.com/swagger-api/swagger-codegen.git
Swagger Codegen version: 2.3.1

=end

require "uri"

module NSXT
  class CloudServiceManagerApi
    attr_accessor :api_client

    def initialize(api_client = ApiClient.default)
      @api_client = api_client
    end

    # Returns the details of the particular AWS account
    # Returns the details of the particular AWS account
    # @param account_id ID of AWS account
    # @param [Hash] opts the optional parameters
    # @return [AwsAccount]
    def aws_account_info(account_id, opts = {})
      data, _status_code, _headers = aws_account_info_with_http_info(account_id, opts)
      return data
    end

    # Returns the details of the particular AWS account
    # Returns the details of the particular AWS account
    # @param account_id ID of AWS account
    # @param [Hash] opts the optional parameters
    # @return [Array<(AwsAccount, Fixnum, Hash)>] AwsAccount data, response status code and response headers
    def aws_account_info_with_http_info(account_id, opts = {})
      if @api_client.config.debugging
        @api_client.config.logger.debug "Calling API: CloudServiceManagerApi.aws_account_info ..."
      end
      # verify the required parameter 'account_id' is set
      if @api_client.config.client_side_validation && account_id.nil?
        fail ArgumentError, "Missing the required parameter 'account_id' when calling CloudServiceManagerApi.aws_account_info"
      end
      # resource path
      local_var_path = "/csm/aws/accounts/{account-id}".sub('{' + 'account-id' + '}', account_id.to_s)

      # query parameters
      query_params = {}

      # header parameters
      header_params = {}
      # HTTP header 'Accept' (if needed)
      header_params['Accept'] = @api_client.select_header_accept(['application/json'])
      # HTTP header 'Content-Type'
      header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

      # form parameters
      form_params = {}

      # http body (model)
      post_body = nil
      auth_names = ['BasicAuth']
      data, status_code, headers = @api_client.call_api(:GET, local_var_path,
        :header_params => header_params,
        :query_params => query_params,
        :form_params => form_params,
        :body => post_body,
        :auth_names => auth_names,
        :return_type => 'AwsAccount')
      if @api_client.config.debugging
        @api_client.config.logger.debug "API called: CloudServiceManagerApi#aws_account_info\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
      end
      return data, status_code, headers
    end

    # Returns information about the particual Aws Region
    # Returns information about the particual Aws Region
    # @param region_id ID of the region
    # @param [Hash] opts the optional parameters
    # @return [AwsRegion]
    def aws_region_info(region_id, opts = {})
      data, _status_code, _headers = aws_region_info_with_http_info(region_id, opts)
      return data
    end

    # Returns information about the particual Aws Region
    # Returns information about the particual Aws Region
    # @param region_id ID of the region
    # @param [Hash] opts the optional parameters
    # @return [Array<(AwsRegion, Fixnum, Hash)>] AwsRegion data, response status code and response headers
    def aws_region_info_with_http_info(region_id, opts = {})
      if @api_client.config.debugging
        @api_client.config.logger.debug "Calling API: CloudServiceManagerApi.aws_region_info ..."
      end
      # verify the required parameter 'region_id' is set
      if @api_client.config.client_side_validation && region_id.nil?
        fail ArgumentError, "Missing the required parameter 'region_id' when calling CloudServiceManagerApi.aws_region_info"
      end
      # resource path
      local_var_path = "/csm/aws/regions/{region-id}".sub('{' + 'region-id' + '}', region_id.to_s)

      # query parameters
      query_params = {}

      # header parameters
      header_params = {}
      # HTTP header 'Accept' (if needed)
      header_params['Accept'] = @api_client.select_header_accept(['application/json'])
      # HTTP header 'Content-Type'
      header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

      # form parameters
      form_params = {}

      # http body (model)
      post_body = nil
      auth_names = ['BasicAuth']
      data, status_code, headers = @api_client.call_api(:GET, local_var_path,
        :header_params => header_params,
        :query_params => query_params,
        :form_params => form_params,
        :body => post_body,
        :auth_names => auth_names,
        :return_type => 'AwsRegion')
      if @api_client.config.debugging
        @api_client.config.logger.debug "API called: CloudServiceManagerApi#aws_region_info\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
      end
      return data, status_code, headers
    end

    # Returns Vpc information
    # Returns Vpc information
    # @param vpc_id ID of the Vpc
    # @param [Hash] opts the optional parameters
    # @return [AwsVpc]
    def aws_vpc_info(vpc_id, opts = {})
      data, _status_code, _headers = aws_vpc_info_with_http_info(vpc_id, opts)
      return data
    end

    # Returns Vpc information
    # Returns Vpc information
    # @param vpc_id ID of the Vpc
    # @param [Hash] opts the optional parameters
    # @return [Array<(AwsVpc, Fixnum, Hash)>] AwsVpc data, response status code and response headers
    def aws_vpc_info_with_http_info(vpc_id, opts = {})
      if @api_client.config.debugging
        @api_client.config.logger.debug "Calling API: CloudServiceManagerApi.aws_vpc_info ..."
      end
      # verify the required parameter 'vpc_id' is set
      if @api_client.config.client_side_validation && vpc_id.nil?
        fail ArgumentError, "Missing the required parameter 'vpc_id' when calling CloudServiceManagerApi.aws_vpc_info"
      end
      # resource path
      local_var_path = "/csm/aws/vpcs/{vpc-id}".sub('{' + 'vpc-id' + '}', vpc_id.to_s)

      # query parameters
      query_params = {}

      # header parameters
      header_params = {}
      # HTTP header 'Accept' (if needed)
      header_params['Accept'] = @api_client.select_header_accept(['application/json'])
      # HTTP header 'Content-Type'
      header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

      # form parameters
      form_params = {}

      # http body (model)
      post_body = nil
      auth_names = ['BasicAuth']
      data, status_code, headers = @api_client.call_api(:GET, local_var_path,
        :header_params => header_params,
        :query_params => query_params,
        :form_params => form_params,
        :body => post_body,
        :auth_names => auth_names,
        :return_type => 'AwsVpc')
      if @api_client.config.debugging
        @api_client.config.logger.debug "API called: CloudServiceManagerApi#aws_vpc_info\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
      end
      return data, status_code, headers
    end

    # Returns information about the particular virtual machine
    # Returns information about the particular virtual machine
    # @param virtual_machine_id ID of the virtual machine
    # @param [Hash] opts the optional parameters
    # @return [CloudVirtualMachine]
    def cloud_virtual_machine_info(virtual_machine_id, opts = {})
      data, _status_code, _headers = cloud_virtual_machine_info_with_http_info(virtual_machine_id, opts)
      return data
    end

    # Returns information about the particular virtual machine
    # Returns information about the particular virtual machine
    # @param virtual_machine_id ID of the virtual machine
    # @param [Hash] opts the optional parameters
    # @return [Array<(CloudVirtualMachine, Fixnum, Hash)>] CloudVirtualMachine data, response status code and response headers
    def cloud_virtual_machine_info_with_http_info(virtual_machine_id, opts = {})
      if @api_client.config.debugging
        @api_client.config.logger.debug "Calling API: CloudServiceManagerApi.cloud_virtual_machine_info ..."
      end
      # verify the required parameter 'virtual_machine_id' is set
      if @api_client.config.client_side_validation && virtual_machine_id.nil?
        fail ArgumentError, "Missing the required parameter 'virtual_machine_id' when calling CloudServiceManagerApi.cloud_virtual_machine_info"
      end
      # resource path
      local_var_path = "/csm/virtual-machines/{virtual-machine-id}".sub('{' + 'virtual-machine-id' + '}', virtual_machine_id.to_s)

      # query parameters
      query_params = {}

      # header parameters
      header_params = {}
      # HTTP header 'Accept' (if needed)
      header_params['Accept'] = @api_client.select_header_accept(['application/json'])
      # HTTP header 'Content-Type'
      header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

      # form parameters
      form_params = {}

      # http body (model)
      post_body = nil
      auth_names = ['BasicAuth']
      data, status_code, headers = @api_client.call_api(:GET, local_var_path,
        :header_params => header_params,
        :query_params => query_params,
        :form_params => form_params,
        :body => post_body,
        :auth_names => auth_names,
        :return_type => 'CloudVirtualMachine')
      if @api_client.config.debugging
        @api_client.config.logger.debug "API called: CloudServiceManagerApi#cloud_virtual_machine_info\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
      end
      return data, status_code, headers
    end

    # Add a AWS account to cloud serivce manager
    # Add a AWS account to cloud serivce manager
    # @param aws_account 
    # @param [Hash] opts the optional parameters
    # @return [AwsAccount]
    def create_aws_account(aws_account, opts = {})
      data, _status_code, _headers = create_aws_account_with_http_info(aws_account, opts)
      return data
    end

    # Add a AWS account to cloud serivce manager
    # Add a AWS account to cloud serivce manager
    # @param aws_account 
    # @param [Hash] opts the optional parameters
    # @return [Array<(AwsAccount, Fixnum, Hash)>] AwsAccount data, response status code and response headers
    def create_aws_account_with_http_info(aws_account, opts = {})
      if @api_client.config.debugging
        @api_client.config.logger.debug "Calling API: CloudServiceManagerApi.create_aws_account ..."
      end
      # verify the required parameter 'aws_account' is set
      if @api_client.config.client_side_validation && aws_account.nil?
        fail ArgumentError, "Missing the required parameter 'aws_account' when calling CloudServiceManagerApi.create_aws_account"
      end
      # resource path
      local_var_path = "/csm/aws/accounts"

      # query parameters
      query_params = {}

      # header parameters
      header_params = {}
      # HTTP header 'Accept' (if needed)
      header_params['Accept'] = @api_client.select_header_accept(['application/json'])
      # HTTP header 'Content-Type'
      header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

      # form parameters
      form_params = {}

      # http body (model)
      post_body = @api_client.object_to_http_body(aws_account)
      auth_names = ['BasicAuth']
      data, status_code, headers = @api_client.call_api(:POST, local_var_path,
        :header_params => header_params,
        :query_params => query_params,
        :form_params => form_params,
        :body => post_body,
        :auth_names => auth_names,
        :return_type => 'AwsAccount')
      if @api_client.config.debugging
        @api_client.config.logger.debug "API called: CloudServiceManagerApi#create_aws_account\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
      end
      return data, status_code, headers
    end

    # Create a NSX Manager account
    # Create a NSX Manager account
    # @param nsx_manager_account 
    # @param [Hash] opts the optional parameters
    # @return [NsxManagerAccount]
    def create_nsx_manager_account(nsx_manager_account, opts = {})
      data, _status_code, _headers = create_nsx_manager_account_with_http_info(nsx_manager_account, opts)
      return data
    end

    # Create a NSX Manager account
    # Create a NSX Manager account
    # @param nsx_manager_account 
    # @param [Hash] opts the optional parameters
    # @return [Array<(NsxManagerAccount, Fixnum, Hash)>] NsxManagerAccount data, response status code and response headers
    def create_nsx_manager_account_with_http_info(nsx_manager_account, opts = {})
      if @api_client.config.debugging
        @api_client.config.logger.debug "Calling API: CloudServiceManagerApi.create_nsx_manager_account ..."
      end
      # verify the required parameter 'nsx_manager_account' is set
      if @api_client.config.client_side_validation && nsx_manager_account.nil?
        fail ArgumentError, "Missing the required parameter 'nsx_manager_account' when calling CloudServiceManagerApi.create_nsx_manager_account"
      end
      # resource path
      local_var_path = "/csm/nsx-manager-accounts"

      # query parameters
      query_params = {}

      # header parameters
      header_params = {}
      # HTTP header 'Accept' (if needed)
      header_params['Accept'] = @api_client.select_header_accept(['application/json'])
      # HTTP header 'Content-Type'
      header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

      # form parameters
      form_params = {}

      # http body (model)
      post_body = @api_client.object_to_http_body(nsx_manager_account)
      auth_names = ['BasicAuth']
      data, status_code, headers = @api_client.call_api(:POST, local_var_path,
        :header_params => header_params,
        :query_params => query_params,
        :form_params => form_params,
        :body => post_body,
        :auth_names => auth_names,
        :return_type => 'NsxManagerAccount')
      if @api_client.config.debugging
        @api_client.config.logger.debug "API called: CloudServiceManagerApi#create_nsx_manager_account\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
      end
      return data, status_code, headers
    end

    # Delete AWS account information
    # Delete AWS account information
    # @param account_id ID of AWS account to delete
    # @param [Hash] opts the optional parameters
    # @return [nil]
    def delete_aws_account(account_id, opts = {})
      delete_aws_account_with_http_info(account_id, opts)
      return nil
    end

    # Delete AWS account information
    # Delete AWS account information
    # @param account_id ID of AWS account to delete
    # @param [Hash] opts the optional parameters
    # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
    def delete_aws_account_with_http_info(account_id, opts = {})
      if @api_client.config.debugging
        @api_client.config.logger.debug "Calling API: CloudServiceManagerApi.delete_aws_account ..."
      end
      # verify the required parameter 'account_id' is set
      if @api_client.config.client_side_validation && account_id.nil?
        fail ArgumentError, "Missing the required parameter 'account_id' when calling CloudServiceManagerApi.delete_aws_account"
      end
      # resource path
      local_var_path = "/csm/aws/accounts/{account-id}".sub('{' + 'account-id' + '}', account_id.to_s)

      # query parameters
      query_params = {}

      # header parameters
      header_params = {}
      # HTTP header 'Accept' (if needed)
      header_params['Accept'] = @api_client.select_header_accept(['application/json'])
      # HTTP header 'Content-Type'
      header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

      # form parameters
      form_params = {}

      # http body (model)
      post_body = nil
      auth_names = ['BasicAuth']
      data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
        :header_params => header_params,
        :query_params => query_params,
        :form_params => form_params,
        :body => post_body,
        :auth_names => auth_names)
      if @api_client.config.debugging
        @api_client.config.logger.debug "API called: CloudServiceManagerApi#delete_aws_account\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
      end
      return data, status_code, headers
    end

    # Delete a AWS Gateway AMI
    # Delete a AWS Gateway AMI
    # @param region_id ID of AWS region
    # @param [Hash] opts the optional parameters
    # @return [nil]
    def delete_aws_gateway_ami(region_id, opts = {})
      delete_aws_gateway_ami_with_http_info(region_id, opts)
      return nil
    end

    # Delete a AWS Gateway AMI
    # Delete a AWS Gateway AMI
    # @param region_id ID of AWS region
    # @param [Hash] opts the optional parameters
    # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
    def delete_aws_gateway_ami_with_http_info(region_id, opts = {})
      if @api_client.config.debugging
        @api_client.config.logger.debug "Calling API: CloudServiceManagerApi.delete_aws_gateway_ami ..."
      end
      # verify the required parameter 'region_id' is set
      if @api_client.config.client_side_validation && region_id.nil?
        fail ArgumentError, "Missing the required parameter 'region_id' when calling CloudServiceManagerApi.delete_aws_gateway_ami"
      end
      # resource path
      local_var_path = "/csm/aws/gateway-amis/{region-id}".sub('{' + 'region-id' + '}', region_id.to_s)

      # query parameters
      query_params = {}

      # header parameters
      header_params = {}
      # HTTP header 'Accept' (if needed)
      header_params['Accept'] = @api_client.select_header_accept(['application/json'])
      # HTTP header 'Content-Type'
      header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

      # form parameters
      form_params = {}

      # http body (model)
      post_body = nil
      auth_names = ['BasicAuth']
      data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
        :header_params => header_params,
        :query_params => query_params,
        :form_params => form_params,
        :body => post_body,
        :auth_names => auth_names)
      if @api_client.config.debugging
        @api_client.config.logger.debug "API called: CloudServiceManagerApi#delete_aws_gateway_ami\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
      end
      return data, status_code, headers
    end

    # Delete a NSX Manager account
    # Delete a NSX Manager account
    # @param account_id ID of NSX Manager account
    # @param [Hash] opts the optional parameters
    # @return [nil]
    def delete_nsx_manager_account(account_id, opts = {})
      delete_nsx_manager_account_with_http_info(account_id, opts)
      return nil
    end

    # Delete a NSX Manager account
    # Delete a NSX Manager account
    # @param account_id ID of NSX Manager account
    # @param [Hash] opts the optional parameters
    # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
    def delete_nsx_manager_account_with_http_info(account_id, opts = {})
      if @api_client.config.debugging
        @api_client.config.logger.debug "Calling API: CloudServiceManagerApi.delete_nsx_manager_account ..."
      end
      # verify the required parameter 'account_id' is set
      if @api_client.config.client_side_validation && account_id.nil?
        fail ArgumentError, "Missing the required parameter 'account_id' when calling CloudServiceManagerApi.delete_nsx_manager_account"
      end
      # resource path
      local_var_path = "/csm/nsx-manager-accounts/{account-id}".sub('{' + 'account-id' + '}', account_id.to_s)

      # query parameters
      query_params = {}

      # header parameters
      header_params = {}
      # HTTP header 'Accept' (if needed)
      header_params['Accept'] = @api_client.select_header_accept(['application/json'])
      # HTTP header 'Content-Type'
      header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

      # form parameters
      form_params = {}

      # http body (model)
      post_body = nil
      auth_names = ['BasicAuth']
      data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
        :header_params => header_params,
        :query_params => query_params,
        :form_params => form_params,
        :body => post_body,
        :auth_names => auth_names)
      if @api_client.config.debugging
        @api_client.config.logger.debug "API called: CloudServiceManagerApi#delete_nsx_manager_account\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
      end
      return data, status_code, headers
    end

    # All the required configuration to deploy Aws gateways will be absorbed as a part of request body in this api and gateway deployment will be triggered. 
    # All the required configuration to deploy Aws gateways will be absorbed as a part of request body in this api and gateway deployment will be triggered. 
    # @param aws_gateway_deploy_config 
    # @param [Hash] opts the optional parameters
    # @return [AwsGatewayDeployConfig]
    def deploy_aws_gateway_deploy(aws_gateway_deploy_config, opts = {})
      data, _status_code, _headers = deploy_aws_gateway_deploy_with_http_info(aws_gateway_deploy_config, opts)
      return data
    end

    # All the required configuration to deploy Aws gateways will be absorbed as a part of request body in this api and gateway deployment will be triggered. 
    # All the required configuration to deploy Aws gateways will be absorbed as a part of request body in this api and gateway deployment will be triggered. 
    # @param aws_gateway_deploy_config 
    # @param [Hash] opts the optional parameters
    # @return [Array<(AwsGatewayDeployConfig, Fixnum, Hash)>] AwsGatewayDeployConfig data, response status code and response headers
    def deploy_aws_gateway_deploy_with_http_info(aws_gateway_deploy_config, opts = {})
      if @api_client.config.debugging
        @api_client.config.logger.debug "Calling API: CloudServiceManagerApi.deploy_aws_gateway_deploy ..."
      end
      # verify the required parameter 'aws_gateway_deploy_config' is set
      if @api_client.config.client_side_validation && aws_gateway_deploy_config.nil?
        fail ArgumentError, "Missing the required parameter 'aws_gateway_deploy_config' when calling CloudServiceManagerApi.deploy_aws_gateway_deploy"
      end
      # resource path
      local_var_path = "/csm/aws/gateways?action=deploy"

      # query parameters
      query_params = {}

      # header parameters
      header_params = {}
      # HTTP header 'Accept' (if needed)
      header_params['Accept'] = @api_client.select_header_accept(['application/json'])
      # HTTP header 'Content-Type'
      header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

      # form parameters
      form_params = {}

      # http body (model)
      post_body = @api_client.object_to_http_body(aws_gateway_deploy_config)
      auth_names = ['BasicAuth']
      data, status_code, headers = @api_client.call_api(:POST, local_var_path,
        :header_params => header_params,
        :query_params => query_params,
        :form_params => form_params,
        :body => post_body,
        :auth_names => auth_names,
        :return_type => 'AwsGatewayDeployConfig')
      if @api_client.config.debugging
        @api_client.config.logger.debug "API called: CloudServiceManagerApi#deploy_aws_gateway_deploy\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
      end
      return data, status_code, headers
    end

    # Return status of the account like credentails validity, inventory synchronization status and inventory synchronization state 
    # Return status of the account like credentails validity, inventory synchronization status and inventory synchronization state 
    # @param account_id ID of AWS account
    # @param [Hash] opts the optional parameters
    # @return [AwsAccountStatus]
    def get_aws_account_status(account_id, opts = {})
      data, _status_code, _headers = get_aws_account_status_with_http_info(account_id, opts)
      return data
    end

    # Return status of the account like credentails validity, inventory synchronization status and inventory synchronization state 
    # Return status of the account like credentails validity, inventory synchronization status and inventory synchronization state 
    # @param account_id ID of AWS account
    # @param [Hash] opts the optional parameters
    # @return [Array<(AwsAccountStatus, Fixnum, Hash)>] AwsAccountStatus data, response status code and response headers
    def get_aws_account_status_with_http_info(account_id, opts = {})
      if @api_client.config.debugging
        @api_client.config.logger.debug "Calling API: CloudServiceManagerApi.get_aws_account_status ..."
      end
      # verify the required parameter 'account_id' is set
      if @api_client.config.client_side_validation && account_id.nil?
        fail ArgumentError, "Missing the required parameter 'account_id' when calling CloudServiceManagerApi.get_aws_account_status"
      end
      # resource path
      local_var_path = "/csm/aws/accounts/{account-id}/status".sub('{' + 'account-id' + '}', account_id.to_s)

      # query parameters
      query_params = {}

      # header parameters
      header_params = {}
      # HTTP header 'Accept' (if needed)
      header_params['Accept'] = @api_client.select_header_accept(['application/json'])
      # HTTP header 'Content-Type'
      header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

      # form parameters
      form_params = {}

      # http body (model)
      post_body = nil
      auth_names = ['BasicAuth']
      data, status_code, headers = @api_client.call_api(:GET, local_var_path,
        :header_params => header_params,
        :query_params => query_params,
        :form_params => form_params,
        :body => post_body,
        :auth_names => auth_names,
        :return_type => 'AwsAccountStatus')
      if @api_client.config.debugging
        @api_client.config.logger.debug "API called: CloudServiceManagerApi#get_aws_account_status\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
      end
      return data, status_code, headers
    end

    # Returns AWS Gateway AMI for a particular region
    # Returns AWS Gateway AMI for a particular region
    # @param region_id ID of AWS region
    # @param [Hash] opts the optional parameters
    # @return [AwsGatewayAmiInfo]
    def get_aws_gateway_ami_info(region_id, opts = {})
      data, _status_code, _headers = get_aws_gateway_ami_info_with_http_info(region_id, opts)
      return data
    end

    # Returns AWS Gateway AMI for a particular region
    # Returns AWS Gateway AMI for a particular region
    # @param region_id ID of AWS region
    # @param [Hash] opts the optional parameters
    # @return [Array<(AwsGatewayAmiInfo, Fixnum, Hash)>] AwsGatewayAmiInfo data, response status code and response headers
    def get_aws_gateway_ami_info_with_http_info(region_id, opts = {})
      if @api_client.config.debugging
        @api_client.config.logger.debug "Calling API: CloudServiceManagerApi.get_aws_gateway_ami_info ..."
      end
      # verify the required parameter 'region_id' is set
      if @api_client.config.client_side_validation && region_id.nil?
        fail ArgumentError, "Missing the required parameter 'region_id' when calling CloudServiceManagerApi.get_aws_gateway_ami_info"
      end
      # resource path
      local_var_path = "/csm/aws/gateway-amis/{region-id}".sub('{' + 'region-id' + '}', region_id.to_s)

      # query parameters
      query_params = {}

      # header parameters
      header_params = {}
      # HTTP header 'Accept' (if needed)
      header_params['Accept'] = @api_client.select_header_accept(['application/json'])
      # HTTP header 'Content-Type'
      header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

      # form parameters
      form_params = {}

      # http body (model)
      post_body = nil
      auth_names = ['BasicAuth']
      data, status_code, headers = @api_client.call_api(:GET, local_var_path,
        :header_params => header_params,
        :query_params => query_params,
        :form_params => form_params,
        :body => post_body,
        :auth_names => auth_names,
        :return_type => 'AwsGatewayAmiInfo')
      if @api_client.config.debugging
        @api_client.config.logger.debug "API called: CloudServiceManagerApi#get_aws_gateway_ami_info\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
      end
      return data, status_code, headers
    end

    # Returns configuration for primary gateway and secondary gateway for the vpc,if exists. 
    # Returns configuration for primary gateway and secondary gateway for the vpc,if exists. 
    # @param vpc_id ID of the Vpc
    # @param [Hash] opts the optional parameters
    # @return [AwsGatewayDeployConfig]
    def get_aws_gateway_config(vpc_id, opts = {})
      data, _status_code, _headers = get_aws_gateway_config_with_http_info(vpc_id, opts)
      return data
    end

    # Returns configuration for primary gateway and secondary gateway for the vpc,if exists. 
    # Returns configuration for primary gateway and secondary gateway for the vpc,if exists. 
    # @param vpc_id ID of the Vpc
    # @param [Hash] opts the optional parameters
    # @return [Array<(AwsGatewayDeployConfig, Fixnum, Hash)>] AwsGatewayDeployConfig data, response status code and response headers
    def get_aws_gateway_config_with_http_info(vpc_id, opts = {})
      if @api_client.config.debugging
        @api_client.config.logger.debug "Calling API: CloudServiceManagerApi.get_aws_gateway_config ..."
      end
      # verify the required parameter 'vpc_id' is set
      if @api_client.config.client_side_validation && vpc_id.nil?
        fail ArgumentError, "Missing the required parameter 'vpc_id' when calling CloudServiceManagerApi.get_aws_gateway_config"
      end
      # resource path
      local_var_path = "/csm/aws/gateways/{vpc-id}".sub('{' + 'vpc-id' + '}', vpc_id.to_s)

      # query parameters
      query_params = {}

      # header parameters
      header_params = {}
      # HTTP header 'Accept' (if needed)
      header_params['Accept'] = @api_client.select_header_accept(['application/json'])
      # HTTP header 'Content-Type'
      header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

      # form parameters
      form_params = {}

      # http body (model)
      post_body = nil
      auth_names = ['BasicAuth']
      data, status_code, headers = @api_client.call_api(:GET, local_var_path,
        :header_params => header_params,
        :query_params => query_params,
        :form_params => form_params,
        :body => post_body,
        :auth_names => auth_names,
        :return_type => 'AwsGatewayDeployConfig')
      if @api_client.config.debugging
        @api_client.config.logger.debug "API called: CloudServiceManagerApi#get_aws_gateway_config\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
      end
      return data, status_code, headers
    end

    # Returns status information for primary gateway and secondary gateway for the vpc, if exists. 
    # Returns status information for primary gateway and secondary gateway for the vpc, if exists. 
    # @param vpc_id 
    # @param [Hash] opts the optional parameters
    # @return [AwsGatewayStatus]
    def get_aws_gateway_status(vpc_id, opts = {})
      data, _status_code, _headers = get_aws_gateway_status_with_http_info(vpc_id, opts)
      return data
    end

    # Returns status information for primary gateway and secondary gateway for the vpc, if exists. 
    # Returns status information for primary gateway and secondary gateway for the vpc, if exists. 
    # @param vpc_id 
    # @param [Hash] opts the optional parameters
    # @return [Array<(AwsGatewayStatus, Fixnum, Hash)>] AwsGatewayStatus data, response status code and response headers
    def get_aws_gateway_status_with_http_info(vpc_id, opts = {})
      if @api_client.config.debugging
        @api_client.config.logger.debug "Calling API: CloudServiceManagerApi.get_aws_gateway_status ..."
      end
      # verify the required parameter 'vpc_id' is set
      if @api_client.config.client_side_validation && vpc_id.nil?
        fail ArgumentError, "Missing the required parameter 'vpc_id' when calling CloudServiceManagerApi.get_aws_gateway_status"
      end
      # resource path
      local_var_path = "/csm/aws/gateways/{vpc-id}/status".sub('{' + 'vpc-id' + '}', vpc_id.to_s)

      # query parameters
      query_params = {}

      # header parameters
      header_params = {}
      # HTTP header 'Accept' (if needed)
      header_params['Accept'] = @api_client.select_header_accept(['application/json'])
      # HTTP header 'Content-Type'
      header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

      # form parameters
      form_params = {}

      # http body (model)
      post_body = nil
      auth_names = ['BasicAuth']
      data, status_code, headers = @api_client.call_api(:GET, local_var_path,
        :header_params => header_params,
        :query_params => query_params,
        :form_params => form_params,
        :body => post_body,
        :auth_names => auth_names,
        :return_type => 'AwsGatewayStatus')
      if @api_client.config.debugging
        @api_client.config.logger.debug "API called: CloudServiceManagerApi#get_aws_gateway_status\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
      end
      return data, status_code, headers
    end

    # Return Csm status information
    # Return Csm status information
    # @param [Hash] opts the optional parameters
    # @option opts [String] :cursor Opaque cursor to be used for getting next page of records (supplied by current result page)
    # @option opts [String] :included_fields Comma separated list of fields that should be included to result of query
    # @option opts [Integer] :page_size Maximum number of results to return in this page (server may return fewer) (default to 1000)
    # @option opts [BOOLEAN] :sort_ascending 
    # @option opts [String] :sort_by Field by which records are sorted
    # @return [CsmStatus]
    def get_csm_status(opts = {})
      data, _status_code, _headers = get_csm_status_with_http_info(opts)
      return data
    end

    # Return Csm status information
    # Return Csm status information
    # @param [Hash] opts the optional parameters
    # @option opts [String] :cursor Opaque cursor to be used for getting next page of records (supplied by current result page)
    # @option opts [String] :included_fields Comma separated list of fields that should be included to result of query
    # @option opts [Integer] :page_size Maximum number of results to return in this page (server may return fewer)
    # @option opts [BOOLEAN] :sort_ascending 
    # @option opts [String] :sort_by Field by which records are sorted
    # @return [Array<(CsmStatus, Fixnum, Hash)>] CsmStatus data, response status code and response headers
    def get_csm_status_with_http_info(opts = {})
      if @api_client.config.debugging
        @api_client.config.logger.debug "Calling API: CloudServiceManagerApi.get_csm_status ..."
      end
      if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] > 1000
        fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling CloudServiceManagerApi.get_csm_status, must be smaller than or equal to 1000.'
      end

      if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] < 0
        fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling CloudServiceManagerApi.get_csm_status, must be greater than or equal to 0.'
      end

      # resource path
      local_var_path = "/csm/csmstatus"

      # query parameters
      query_params = {}
      query_params[:'cursor'] = opts[:'cursor'] if !opts[:'cursor'].nil?
      query_params[:'included_fields'] = opts[:'included_fields'] if !opts[:'included_fields'].nil?
      query_params[:'page_size'] = opts[:'page_size'] if !opts[:'page_size'].nil?
      query_params[:'sort_ascending'] = opts[:'sort_ascending'] if !opts[:'sort_ascending'].nil?
      query_params[:'sort_by'] = opts[:'sort_by'] if !opts[:'sort_by'].nil?

      # header parameters
      header_params = {}
      # HTTP header 'Accept' (if needed)
      header_params['Accept'] = @api_client.select_header_accept(['application/json'])
      # HTTP header 'Content-Type'
      header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

      # form parameters
      form_params = {}

      # http body (model)
      post_body = nil
      auth_names = ['BasicAuth']
      data, status_code, headers = @api_client.call_api(:GET, local_var_path,
        :header_params => header_params,
        :query_params => query_params,
        :form_params => form_params,
        :body => post_body,
        :auth_names => auth_names,
        :return_type => 'CsmStatus')
      if @api_client.config.debugging
        @api_client.config.logger.debug "API called: CloudServiceManagerApi#get_csm_status\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
      end
      return data, status_code, headers
    end

    # Return a list of all AWS accounts
    # Return a list of all AWS accounts
    # @param [Hash] opts the optional parameters
    # @option opts [String] :cursor Opaque cursor to be used for getting next page of records (supplied by current result page)
    # @option opts [String] :included_fields Comma separated list of fields that should be included to result of query
    # @option opts [Integer] :page_size Maximum number of results to return in this page (server may return fewer) (default to 1000)
    # @option opts [String] :region_id Identifier for region based on which accounts statistics will be aggregated. Using this request parameter will return only all_accounts_vpc_stats and all_accounts_instance_stats properties. 
    # @option opts [BOOLEAN] :sort_ascending 
    # @option opts [String] :sort_by Field by which records are sorted
    # @return [AwsAccountsListResult]
    def list_aws_accounts(opts = {})
      data, _status_code, _headers = list_aws_accounts_with_http_info(opts)
      return data
    end

    # Return a list of all AWS accounts
    # Return a list of all AWS accounts
    # @param [Hash] opts the optional parameters
    # @option opts [String] :cursor Opaque cursor to be used for getting next page of records (supplied by current result page)
    # @option opts [String] :included_fields Comma separated list of fields that should be included to result of query
    # @option opts [Integer] :page_size Maximum number of results to return in this page (server may return fewer)
    # @option opts [String] :region_id Identifier for region based on which accounts statistics will be aggregated. Using this request parameter will return only all_accounts_vpc_stats and all_accounts_instance_stats properties. 
    # @option opts [BOOLEAN] :sort_ascending 
    # @option opts [String] :sort_by Field by which records are sorted
    # @return [Array<(AwsAccountsListResult, Fixnum, Hash)>] AwsAccountsListResult data, response status code and response headers
    def list_aws_accounts_with_http_info(opts = {})
      if @api_client.config.debugging
        @api_client.config.logger.debug "Calling API: CloudServiceManagerApi.list_aws_accounts ..."
      end
      if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] > 1000
        fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling CloudServiceManagerApi.list_aws_accounts, must be smaller than or equal to 1000.'
      end

      if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] < 0
        fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling CloudServiceManagerApi.list_aws_accounts, must be greater than or equal to 0.'
      end

      # resource path
      local_var_path = "/csm/aws/accounts"

      # query parameters
      query_params = {}
      query_params[:'cursor'] = opts[:'cursor'] if !opts[:'cursor'].nil?
      query_params[:'included_fields'] = opts[:'included_fields'] if !opts[:'included_fields'].nil?
      query_params[:'page_size'] = opts[:'page_size'] if !opts[:'page_size'].nil?
      query_params[:'region_id'] = opts[:'region_id'] if !opts[:'region_id'].nil?
      query_params[:'sort_ascending'] = opts[:'sort_ascending'] if !opts[:'sort_ascending'].nil?
      query_params[:'sort_by'] = opts[:'sort_by'] if !opts[:'sort_by'].nil?

      # header parameters
      header_params = {}
      # HTTP header 'Accept' (if needed)
      header_params['Accept'] = @api_client.select_header_accept(['application/json'])
      # HTTP header 'Content-Type'
      header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

      # form parameters
      form_params = {}

      # http body (model)
      post_body = nil
      auth_names = ['BasicAuth']
      data, status_code, headers = @api_client.call_api(:GET, local_var_path,
        :header_params => header_params,
        :query_params => query_params,
        :form_params => form_params,
        :body => post_body,
        :auth_names => auth_names,
        :return_type => 'AwsAccountsListResult')
      if @api_client.config.debugging
        @api_client.config.logger.debug "API called: CloudServiceManagerApi#list_aws_accounts\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
      end
      return data, status_code, headers
    end

    # Returns a list of Aws Gateway Amis
    # Returns a list of Aws Gateway Amis
    # @param [Hash] opts the optional parameters
    # @option opts [String] :cursor Opaque cursor to be used for getting next page of records (supplied by current result page)
    # @option opts [String] :included_fields Comma separated list of fields that should be included to result of query
    # @option opts [Integer] :page_size Maximum number of results to return in this page (server may return fewer) (default to 1000)
    # @option opts [String] :region_id Identifier for region based on which list of AWS Gateway AMIs will be obtained 
    # @option opts [BOOLEAN] :sort_ascending 
    # @option opts [String] :sort_by Field by which records are sorted
    # @return [AwsGatewayAmisListResult]
    def list_aws_gateway_amis(opts = {})
      data, _status_code, _headers = list_aws_gateway_amis_with_http_info(opts)
      return data
    end

    # Returns a list of Aws Gateway Amis
    # Returns a list of Aws Gateway Amis
    # @param [Hash] opts the optional parameters
    # @option opts [String] :cursor Opaque cursor to be used for getting next page of records (supplied by current result page)
    # @option opts [String] :included_fields Comma separated list of fields that should be included to result of query
    # @option opts [Integer] :page_size Maximum number of results to return in this page (server may return fewer)
    # @option opts [String] :region_id Identifier for region based on which list of AWS Gateway AMIs will be obtained 
    # @option opts [BOOLEAN] :sort_ascending 
    # @option opts [String] :sort_by Field by which records are sorted
    # @return [Array<(AwsGatewayAmisListResult, Fixnum, Hash)>] AwsGatewayAmisListResult data, response status code and response headers
    def list_aws_gateway_amis_with_http_info(opts = {})
      if @api_client.config.debugging
        @api_client.config.logger.debug "Calling API: CloudServiceManagerApi.list_aws_gateway_amis ..."
      end
      if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] > 1000
        fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling CloudServiceManagerApi.list_aws_gateway_amis, must be smaller than or equal to 1000.'
      end

      if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] < 0
        fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling CloudServiceManagerApi.list_aws_gateway_amis, must be greater than or equal to 0.'
      end

      # resource path
      local_var_path = "/csm/aws/gateway-amis"

      # query parameters
      query_params = {}
      query_params[:'cursor'] = opts[:'cursor'] if !opts[:'cursor'].nil?
      query_params[:'included_fields'] = opts[:'included_fields'] if !opts[:'included_fields'].nil?
      query_params[:'page_size'] = opts[:'page_size'] if !opts[:'page_size'].nil?
      query_params[:'region_id'] = opts[:'region_id'] if !opts[:'region_id'].nil?
      query_params[:'sort_ascending'] = opts[:'sort_ascending'] if !opts[:'sort_ascending'].nil?
      query_params[:'sort_by'] = opts[:'sort_by'] if !opts[:'sort_by'].nil?

      # header parameters
      header_params = {}
      # HTTP header 'Accept' (if needed)
      header_params['Accept'] = @api_client.select_header_accept(['application/json'])
      # HTTP header 'Content-Type'
      header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

      # form parameters
      form_params = {}

      # http body (model)
      post_body = nil
      auth_names = ['BasicAuth']
      data, status_code, headers = @api_client.call_api(:GET, local_var_path,
        :header_params => header_params,
        :query_params => query_params,
        :form_params => form_params,
        :body => post_body,
        :auth_names => auth_names,
        :return_type => 'AwsGatewayAmisListResult')
      if @api_client.config.debugging
        @api_client.config.logger.debug "API called: CloudServiceManagerApi#list_aws_gateway_amis\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
      end
      return data, status_code, headers
    end

    # Returns configuration information for all gateways
    # Returns configuration information for all gateways
    # @param [Hash] opts the optional parameters
    # @option opts [String] :account_id Identifier for account based on which Aws gateways list can to be filtered
    # @option opts [String] :cursor Opaque cursor to be used for getting next page of records (supplied by current result page)
    # @option opts [String] :included_fields Comma separated list of fields that should be included to result of query
    # @option opts [Integer] :page_size Maximum number of results to return in this page (server may return fewer) (default to 1000)
    # @option opts [String] :region_id Identifier for region based on which Aws Gateways list can to be filtered
    # @option opts [BOOLEAN] :sort_ascending 
    # @option opts [String] :sort_by Field by which records are sorted
    # @option opts [String] :vpc_id Identifier for vpc based on which Aws Gateways list can to be filtered
    # @return [AwsGatewaysListResult]
    def list_aws_gateways(opts = {})
      data, _status_code, _headers = list_aws_gateways_with_http_info(opts)
      return data
    end

    # Returns configuration information for all gateways
    # Returns configuration information for all gateways
    # @param [Hash] opts the optional parameters
    # @option opts [String] :account_id Identifier for account based on which Aws gateways list can to be filtered
    # @option opts [String] :cursor Opaque cursor to be used for getting next page of records (supplied by current result page)
    # @option opts [String] :included_fields Comma separated list of fields that should be included to result of query
    # @option opts [Integer] :page_size Maximum number of results to return in this page (server may return fewer)
    # @option opts [String] :region_id Identifier for region based on which Aws Gateways list can to be filtered
    # @option opts [BOOLEAN] :sort_ascending 
    # @option opts [String] :sort_by Field by which records are sorted
    # @option opts [String] :vpc_id Identifier for vpc based on which Aws Gateways list can to be filtered
    # @return [Array<(AwsGatewaysListResult, Fixnum, Hash)>] AwsGatewaysListResult data, response status code and response headers
    def list_aws_gateways_with_http_info(opts = {})
      if @api_client.config.debugging
        @api_client.config.logger.debug "Calling API: CloudServiceManagerApi.list_aws_gateways ..."
      end
      if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] > 1000
        fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling CloudServiceManagerApi.list_aws_gateways, must be smaller than or equal to 1000.'
      end

      if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] < 0
        fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling CloudServiceManagerApi.list_aws_gateways, must be greater than or equal to 0.'
      end

      # resource path
      local_var_path = "/csm/aws/gateways"

      # query parameters
      query_params = {}
      query_params[:'account_id'] = opts[:'account_id'] if !opts[:'account_id'].nil?
      query_params[:'cursor'] = opts[:'cursor'] if !opts[:'cursor'].nil?
      query_params[:'included_fields'] = opts[:'included_fields'] if !opts[:'included_fields'].nil?
      query_params[:'page_size'] = opts[:'page_size'] if !opts[:'page_size'].nil?
      query_params[:'region_id'] = opts[:'region_id'] if !opts[:'region_id'].nil?
      query_params[:'sort_ascending'] = opts[:'sort_ascending'] if !opts[:'sort_ascending'].nil?
      query_params[:'sort_by'] = opts[:'sort_by'] if !opts[:'sort_by'].nil?
      query_params[:'vpc_id'] = opts[:'vpc_id'] if !opts[:'vpc_id'].nil?

      # header parameters
      header_params = {}
      # HTTP header 'Accept' (if needed)
      header_params['Accept'] = @api_client.select_header_accept(['application/json'])
      # HTTP header 'Content-Type'
      header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

      # form parameters
      form_params = {}

      # http body (model)
      post_body = nil
      auth_names = ['BasicAuth']
      data, status_code, headers = @api_client.call_api(:GET, local_var_path,
        :header_params => header_params,
        :query_params => query_params,
        :form_params => form_params,
        :body => post_body,
        :auth_names => auth_names,
        :return_type => 'AwsGatewaysListResult')
      if @api_client.config.debugging
        @api_client.config.logger.debug "API called: CloudServiceManagerApi#list_aws_gateways\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
      end
      return data, status_code, headers
    end

    # Returns a list of Aws Key Pairs
    # Returns a list of Aws Key Pairs
    # @param account_id Identifier for account based on which list of key pairs will be obtained 
    # @param region_id Identifier for region based on which list of key pairs will be obtained 
    # @param [Hash] opts the optional parameters
    # @option opts [String] :cursor Opaque cursor to be used for getting next page of records (supplied by current result page)
    # @option opts [String] :included_fields Comma separated list of fields that should be included to result of query
    # @option opts [Integer] :page_size Maximum number of results to return in this page (server may return fewer) (default to 1000)
    # @option opts [BOOLEAN] :sort_ascending 
    # @option opts [String] :sort_by Field by which records are sorted
    # @return [AwsKeyPairList]
    def list_aws_key_pairs(account_id, region_id, opts = {})
      data, _status_code, _headers = list_aws_key_pairs_with_http_info(account_id, region_id, opts)
      return data
    end

    # Returns a list of Aws Key Pairs
    # Returns a list of Aws Key Pairs
    # @param account_id Identifier for account based on which list of key pairs will be obtained 
    # @param region_id Identifier for region based on which list of key pairs will be obtained 
    # @param [Hash] opts the optional parameters
    # @option opts [String] :cursor Opaque cursor to be used for getting next page of records (supplied by current result page)
    # @option opts [String] :included_fields Comma separated list of fields that should be included to result of query
    # @option opts [Integer] :page_size Maximum number of results to return in this page (server may return fewer)
    # @option opts [BOOLEAN] :sort_ascending 
    # @option opts [String] :sort_by Field by which records are sorted
    # @return [Array<(AwsKeyPairList, Fixnum, Hash)>] AwsKeyPairList data, response status code and response headers
    def list_aws_key_pairs_with_http_info(account_id, region_id, opts = {})
      if @api_client.config.debugging
        @api_client.config.logger.debug "Calling API: CloudServiceManagerApi.list_aws_key_pairs ..."
      end
      # verify the required parameter 'account_id' is set
      if @api_client.config.client_side_validation && account_id.nil?
        fail ArgumentError, "Missing the required parameter 'account_id' when calling CloudServiceManagerApi.list_aws_key_pairs"
      end
      # verify the required parameter 'region_id' is set
      if @api_client.config.client_side_validation && region_id.nil?
        fail ArgumentError, "Missing the required parameter 'region_id' when calling CloudServiceManagerApi.list_aws_key_pairs"
      end
      if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] > 1000
        fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling CloudServiceManagerApi.list_aws_key_pairs, must be smaller than or equal to 1000.'
      end

      if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] < 0
        fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling CloudServiceManagerApi.list_aws_key_pairs, must be greater than or equal to 0.'
      end

      # resource path
      local_var_path = "/csm/aws/key-pairs"

      # query parameters
      query_params = {}
      query_params[:'account_id'] = account_id
      query_params[:'region_id'] = region_id
      query_params[:'cursor'] = opts[:'cursor'] if !opts[:'cursor'].nil?
      query_params[:'included_fields'] = opts[:'included_fields'] if !opts[:'included_fields'].nil?
      query_params[:'page_size'] = opts[:'page_size'] if !opts[:'page_size'].nil?
      query_params[:'sort_ascending'] = opts[:'sort_ascending'] if !opts[:'sort_ascending'].nil?
      query_params[:'sort_by'] = opts[:'sort_by'] if !opts[:'sort_by'].nil?

      # header parameters
      header_params = {}
      # HTTP header 'Accept' (if needed)
      header_params['Accept'] = @api_client.select_header_accept(['application/json'])
      # HTTP header 'Content-Type'
      header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

      # form parameters
      form_params = {}

      # http body (model)
      post_body = nil
      auth_names = ['BasicAuth']
      data, status_code, headers = @api_client.call_api(:GET, local_var_path,
        :header_params => header_params,
        :query_params => query_params,
        :form_params => form_params,
        :body => post_body,
        :auth_names => auth_names,
        :return_type => 'AwsKeyPairList')
      if @api_client.config.debugging
        @api_client.config.logger.debug "API called: CloudServiceManagerApi#list_aws_key_pairs\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
      end
      return data, status_code, headers
    end

    # Returns a list of Aws regions
    # Returns a list of Aws regions
    # @param [Hash] opts the optional parameters
    # @option opts [String] :account_id Identifier for account based on which regions are to be filtered
    # @option opts [String] :cursor Opaque cursor to be used for getting next page of records (supplied by current result page)
    # @option opts [String] :included_fields Comma separated list of fields that should be included to result of query
    # @option opts [Integer] :page_size Maximum number of results to return in this page (server may return fewer) (default to 1000)
    # @option opts [String] :region_id Identifier for region based on which the list can be filtered or can be used to validate that hierarchy is correct 
    # @option opts [BOOLEAN] :sort_ascending 
    # @option opts [String] :sort_by Field by which records are sorted
    # @return [AwsRegionsListResult]
    def list_aws_regions(opts = {})
      data, _status_code, _headers = list_aws_regions_with_http_info(opts)
      return data
    end

    # Returns a list of Aws regions
    # Returns a list of Aws regions
    # @param [Hash] opts the optional parameters
    # @option opts [String] :account_id Identifier for account based on which regions are to be filtered
    # @option opts [String] :cursor Opaque cursor to be used for getting next page of records (supplied by current result page)
    # @option opts [String] :included_fields Comma separated list of fields that should be included to result of query
    # @option opts [Integer] :page_size Maximum number of results to return in this page (server may return fewer)
    # @option opts [String] :region_id Identifier for region based on which the list can be filtered or can be used to validate that hierarchy is correct 
    # @option opts [BOOLEAN] :sort_ascending 
    # @option opts [String] :sort_by Field by which records are sorted
    # @return [Array<(AwsRegionsListResult, Fixnum, Hash)>] AwsRegionsListResult data, response status code and response headers
    def list_aws_regions_with_http_info(opts = {})
      if @api_client.config.debugging
        @api_client.config.logger.debug "Calling API: CloudServiceManagerApi.list_aws_regions ..."
      end
      if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] > 1000
        fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling CloudServiceManagerApi.list_aws_regions, must be smaller than or equal to 1000.'
      end

      if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] < 0
        fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling CloudServiceManagerApi.list_aws_regions, must be greater than or equal to 0.'
      end

      # resource path
      local_var_path = "/csm/aws/regions"

      # query parameters
      query_params = {}
      query_params[:'account_id'] = opts[:'account_id'] if !opts[:'account_id'].nil?
      query_params[:'cursor'] = opts[:'cursor'] if !opts[:'cursor'].nil?
      query_params[:'included_fields'] = opts[:'included_fields'] if !opts[:'included_fields'].nil?
      query_params[:'page_size'] = opts[:'page_size'] if !opts[:'page_size'].nil?
      query_params[:'region_id'] = opts[:'region_id'] if !opts[:'region_id'].nil?
      query_params[:'sort_ascending'] = opts[:'sort_ascending'] if !opts[:'sort_ascending'].nil?
      query_params[:'sort_by'] = opts[:'sort_by'] if !opts[:'sort_by'].nil?

      # header parameters
      header_params = {}
      # HTTP header 'Accept' (if needed)
      header_params['Accept'] = @api_client.select_header_accept(['application/json'])
      # HTTP header 'Content-Type'
      header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

      # form parameters
      form_params = {}

      # http body (model)
      post_body = nil
      auth_names = ['BasicAuth']
      data, status_code, headers = @api_client.call_api(:GET, local_var_path,
        :header_params => header_params,
        :query_params => query_params,
        :form_params => form_params,
        :body => post_body,
        :auth_names => auth_names,
        :return_type => 'AwsRegionsListResult')
      if @api_client.config.debugging
        @api_client.config.logger.debug "API called: CloudServiceManagerApi#list_aws_regions\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
      end
      return data, status_code, headers
    end

    # Returns a list of subnets
    # Returns a list of subnets
    # @param account_id Identifier for account based on which subnets are to be filtered
    # @param availability_zone_name Identifier for availability zone based on which subnets are to be filtered
    # @param region_name Identifier for region based on which subnets are to be filtered
    # @param vpc_id Identifier for vpc based on which subnets are to be filtered
    # @param [Hash] opts the optional parameters
    # @option opts [String] :cursor Opaque cursor to be used for getting next page of records (supplied by current result page)
    # @option opts [String] :included_fields Comma separated list of fields that should be included to result of query
    # @option opts [Integer] :page_size Maximum number of results to return in this page (server may return fewer) (default to 1000)
    # @option opts [BOOLEAN] :sort_ascending 
    # @option opts [String] :sort_by Field by which records are sorted
    # @return [AwsSubnetListResult]
    def list_aws_subnets(account_id, availability_zone_name, region_name, vpc_id, opts = {})
      data, _status_code, _headers = list_aws_subnets_with_http_info(account_id, availability_zone_name, region_name, vpc_id, opts)
      return data
    end

    # Returns a list of subnets
    # Returns a list of subnets
    # @param account_id Identifier for account based on which subnets are to be filtered
    # @param availability_zone_name Identifier for availability zone based on which subnets are to be filtered
    # @param region_name Identifier for region based on which subnets are to be filtered
    # @param vpc_id Identifier for vpc based on which subnets are to be filtered
    # @param [Hash] opts the optional parameters
    # @option opts [String] :cursor Opaque cursor to be used for getting next page of records (supplied by current result page)
    # @option opts [String] :included_fields Comma separated list of fields that should be included to result of query
    # @option opts [Integer] :page_size Maximum number of results to return in this page (server may return fewer)
    # @option opts [BOOLEAN] :sort_ascending 
    # @option opts [String] :sort_by Field by which records are sorted
    # @return [Array<(AwsSubnetListResult, Fixnum, Hash)>] AwsSubnetListResult data, response status code and response headers
    def list_aws_subnets_with_http_info(account_id, availability_zone_name, region_name, vpc_id, opts = {})
      if @api_client.config.debugging
        @api_client.config.logger.debug "Calling API: CloudServiceManagerApi.list_aws_subnets ..."
      end
      # verify the required parameter 'account_id' is set
      if @api_client.config.client_side_validation && account_id.nil?
        fail ArgumentError, "Missing the required parameter 'account_id' when calling CloudServiceManagerApi.list_aws_subnets"
      end
      # verify the required parameter 'availability_zone_name' is set
      if @api_client.config.client_side_validation && availability_zone_name.nil?
        fail ArgumentError, "Missing the required parameter 'availability_zone_name' when calling CloudServiceManagerApi.list_aws_subnets"
      end
      # verify the required parameter 'region_name' is set
      if @api_client.config.client_side_validation && region_name.nil?
        fail ArgumentError, "Missing the required parameter 'region_name' when calling CloudServiceManagerApi.list_aws_subnets"
      end
      # verify the required parameter 'vpc_id' is set
      if @api_client.config.client_side_validation && vpc_id.nil?
        fail ArgumentError, "Missing the required parameter 'vpc_id' when calling CloudServiceManagerApi.list_aws_subnets"
      end
      if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] > 1000
        fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling CloudServiceManagerApi.list_aws_subnets, must be smaller than or equal to 1000.'
      end

      if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] < 0
        fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling CloudServiceManagerApi.list_aws_subnets, must be greater than or equal to 0.'
      end

      # resource path
      local_var_path = "/csm/aws/subnets"

      # query parameters
      query_params = {}
      query_params[:'account_id'] = account_id
      query_params[:'availability_zone_name'] = availability_zone_name
      query_params[:'region_name'] = region_name
      query_params[:'vpc_id'] = vpc_id
      query_params[:'cursor'] = opts[:'cursor'] if !opts[:'cursor'].nil?
      query_params[:'included_fields'] = opts[:'included_fields'] if !opts[:'included_fields'].nil?
      query_params[:'page_size'] = opts[:'page_size'] if !opts[:'page_size'].nil?
      query_params[:'sort_ascending'] = opts[:'sort_ascending'] if !opts[:'sort_ascending'].nil?
      query_params[:'sort_by'] = opts[:'sort_by'] if !opts[:'sort_by'].nil?

      # header parameters
      header_params = {}
      # HTTP header 'Accept' (if needed)
      header_params['Accept'] = @api_client.select_header_accept(['application/json'])
      # HTTP header 'Content-Type'
      header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

      # form parameters
      form_params = {}

      # http body (model)
      post_body = nil
      auth_names = ['BasicAuth']
      data, status_code, headers = @api_client.call_api(:GET, local_var_path,
        :header_params => header_params,
        :query_params => query_params,
        :form_params => form_params,
        :body => post_body,
        :auth_names => auth_names,
        :return_type => 'AwsSubnetListResult')
      if @api_client.config.debugging
        @api_client.config.logger.debug "API called: CloudServiceManagerApi#list_aws_subnets\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
      end
      return data, status_code, headers
    end

    # Returns a list of Vpcs. Support optional query parameters like account_id, region_id, cidr and/or op_status 
    # Returns a list of Vpcs. Support optional query parameters like account_id, region_id, cidr and/or op_status 
    # @param [Hash] opts the optional parameters
    # @option opts [String] :account_id Identifier for account based on which vpcs are to be filtered
    # @option opts [String] :cidr IPV4 CIDR Block for the Vpc
    # @option opts [String] :cursor Opaque cursor to be used for getting next page of records (supplied by current result page)
    # @option opts [String] :included_fields Comma separated list of fields that should be included to result of query
    # @option opts [String] :op_status Identifier for state based on which vpcs are to be filtered
    # @option opts [Integer] :page_size Maximum number of results to return in this page (server may return fewer) (default to 1000)
    # @option opts [String] :region_id Identifier for region based on which vpcs are to be filtered
    # @option opts [BOOLEAN] :sort_ascending 
    # @option opts [String] :sort_by Field by which records are sorted
    # @option opts [String] :vpc_id Identifier for vpc based on which the list can be filtered or can be used to validate that hierarchy is correct 
    # @return [AwsVpcListResult]
    def list_aws_vpcs(opts = {})
      data, _status_code, _headers = list_aws_vpcs_with_http_info(opts)
      return data
    end

    # Returns a list of Vpcs. Support optional query parameters like account_id, region_id, cidr and/or op_status 
    # Returns a list of Vpcs. Support optional query parameters like account_id, region_id, cidr and/or op_status 
    # @param [Hash] opts the optional parameters
    # @option opts [String] :account_id Identifier for account based on which vpcs are to be filtered
    # @option opts [String] :cidr IPV4 CIDR Block for the Vpc
    # @option opts [String] :cursor Opaque cursor to be used for getting next page of records (supplied by current result page)
    # @option opts [String] :included_fields Comma separated list of fields that should be included to result of query
    # @option opts [String] :op_status Identifier for state based on which vpcs are to be filtered
    # @option opts [Integer] :page_size Maximum number of results to return in this page (server may return fewer)
    # @option opts [String] :region_id Identifier for region based on which vpcs are to be filtered
    # @option opts [BOOLEAN] :sort_ascending 
    # @option opts [String] :sort_by Field by which records are sorted
    # @option opts [String] :vpc_id Identifier for vpc based on which the list can be filtered or can be used to validate that hierarchy is correct 
    # @return [Array<(AwsVpcListResult, Fixnum, Hash)>] AwsVpcListResult data, response status code and response headers
    def list_aws_vpcs_with_http_info(opts = {})
      if @api_client.config.debugging
        @api_client.config.logger.debug "Calling API: CloudServiceManagerApi.list_aws_vpcs ..."
      end
      if @api_client.config.client_side_validation && opts[:'op_status'] && !['NSX_MANAGED', 'NSX_UNMANAGED'].include?(opts[:'op_status'])
        fail ArgumentError, 'invalid value for "op_status", must be one of NSX_MANAGED, NSX_UNMANAGED'
      end
      if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] > 1000
        fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling CloudServiceManagerApi.list_aws_vpcs, must be smaller than or equal to 1000.'
      end

      if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] < 0
        fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling CloudServiceManagerApi.list_aws_vpcs, must be greater than or equal to 0.'
      end

      # resource path
      local_var_path = "/csm/aws/vpcs"

      # query parameters
      query_params = {}
      query_params[:'account_id'] = opts[:'account_id'] if !opts[:'account_id'].nil?
      query_params[:'cidr'] = opts[:'cidr'] if !opts[:'cidr'].nil?
      query_params[:'cursor'] = opts[:'cursor'] if !opts[:'cursor'].nil?
      query_params[:'included_fields'] = opts[:'included_fields'] if !opts[:'included_fields'].nil?
      query_params[:'op_status'] = opts[:'op_status'] if !opts[:'op_status'].nil?
      query_params[:'page_size'] = opts[:'page_size'] if !opts[:'page_size'].nil?
      query_params[:'region_id'] = opts[:'region_id'] if !opts[:'region_id'].nil?
      query_params[:'sort_ascending'] = opts[:'sort_ascending'] if !opts[:'sort_ascending'].nil?
      query_params[:'sort_by'] = opts[:'sort_by'] if !opts[:'sort_by'].nil?
      query_params[:'vpc_id'] = opts[:'vpc_id'] if !opts[:'vpc_id'].nil?

      # header parameters
      header_params = {}
      # HTTP header 'Accept' (if needed)
      header_params['Accept'] = @api_client.select_header_accept(['application/json'])
      # HTTP header 'Content-Type'
      header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

      # form parameters
      form_params = {}

      # http body (model)
      post_body = nil
      auth_names = ['BasicAuth']
      data, status_code, headers = @api_client.call_api(:GET, local_var_path,
        :header_params => header_params,
        :query_params => query_params,
        :form_params => form_params,
        :body => post_body,
        :auth_names => auth_names,
        :return_type => 'AwsVpcListResult')
      if @api_client.config.debugging
        @api_client.config.logger.debug "API called: CloudServiceManagerApi#list_aws_vpcs\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
      end
      return data, status_code, headers
    end

    # Returns the list of all virtual machines created or imported under a particular account id. Supports optional query parameters like region id, vpc id, public_ip, is_gateway.
    # Returns the list of all virtual machines created or imported under a particular account id. Supports optional query parameters like region id, vpc id, public_ip, is_gateway.
    # @param [Hash] opts the optional parameters
    # @option opts [String] :account_id Identifier for account based on which virtual machines are to be filtered
    # @option opts [String] :cursor Opaque cursor to be used for getting next page of records (supplied by current result page)
    # @option opts [String] :included_fields Comma separated list of fields that should be included to result of query
    # @option opts [String] :instance_id Identifier for virtual machine based on which the list can be filtered
    # @option opts [BOOLEAN] :is_gateway Is the VM a gateway node?
    # @option opts [String] :logical_switch_id Identifier for logical switch based on which Aws Virtual Machines are to be filtered 
    # @option opts [Integer] :page_size Maximum number of results to return in this page (server may return fewer) (default to 1000)
    # @option opts [String] :public_ip Public IP address of the virtual machine
    # @option opts [String] :quarantine_state Quarantine State
    # @option opts [String] :region_id Identifier for region based on whicha Virtual Machines are to be filtered
    # @option opts [String] :resource_type Identifier for virtual machines of a particular cloud provider
    # @option opts [BOOLEAN] :sort_ascending 
    # @option opts [String] :sort_by Field by which records are sorted
    # @option opts [String] :vpc_id Identifier for vpc based on which Aws Virtual Machines are to be filtered
    # @return [CloudVirtualMachinesListResult]
    def list_cloud_virtual_machines(opts = {})
      data, _status_code, _headers = list_cloud_virtual_machines_with_http_info(opts)
      return data
    end

    # Returns the list of all virtual machines created or imported under a particular account id. Supports optional query parameters like region id, vpc id, public_ip, is_gateway.
    # Returns the list of all virtual machines created or imported under a particular account id. Supports optional query parameters like region id, vpc id, public_ip, is_gateway.
    # @param [Hash] opts the optional parameters
    # @option opts [String] :account_id Identifier for account based on which virtual machines are to be filtered
    # @option opts [String] :cursor Opaque cursor to be used for getting next page of records (supplied by current result page)
    # @option opts [String] :included_fields Comma separated list of fields that should be included to result of query
    # @option opts [String] :instance_id Identifier for virtual machine based on which the list can be filtered
    # @option opts [BOOLEAN] :is_gateway Is the VM a gateway node?
    # @option opts [String] :logical_switch_id Identifier for logical switch based on which Aws Virtual Machines are to be filtered 
    # @option opts [Integer] :page_size Maximum number of results to return in this page (server may return fewer)
    # @option opts [String] :public_ip Public IP address of the virtual machine
    # @option opts [String] :quarantine_state Quarantine State
    # @option opts [String] :region_id Identifier for region based on whicha Virtual Machines are to be filtered
    # @option opts [String] :resource_type Identifier for virtual machines of a particular cloud provider
    # @option opts [BOOLEAN] :sort_ascending 
    # @option opts [String] :sort_by Field by which records are sorted
    # @option opts [String] :vpc_id Identifier for vpc based on which Aws Virtual Machines are to be filtered
    # @return [Array<(CloudVirtualMachinesListResult, Fixnum, Hash)>] CloudVirtualMachinesListResult data, response status code and response headers
    def list_cloud_virtual_machines_with_http_info(opts = {})
      if @api_client.config.debugging
        @api_client.config.logger.debug "Calling API: CloudServiceManagerApi.list_cloud_virtual_machines ..."
      end
      if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] > 1000
        fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling CloudServiceManagerApi.list_cloud_virtual_machines, must be smaller than or equal to 1000.'
      end

      if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] < 0
        fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling CloudServiceManagerApi.list_cloud_virtual_machines, must be greater than or equal to 0.'
      end

      if @api_client.config.client_side_validation && opts[:'quarantine_state'] && !['QUARANTINED', 'NOT_QUARANTINED', 'UNKNOWN', 'OVERRIDDEN'].include?(opts[:'quarantine_state'])
        fail ArgumentError, 'invalid value for "quarantine_state", must be one of QUARANTINED, NOT_QUARANTINED, UNKNOWN, OVERRIDDEN'
      end
      if @api_client.config.client_side_validation && opts[:'resource_type'] && !['AwsVirtualMachine', 'AzureVirtualMachine'].include?(opts[:'resource_type'])
        fail ArgumentError, 'invalid value for "resource_type", must be one of AwsVirtualMachine, AzureVirtualMachine'
      end
      # resource path
      local_var_path = "/csm/virtual-machines"

      # query parameters
      query_params = {}
      query_params[:'account_id'] = opts[:'account_id'] if !opts[:'account_id'].nil?
      query_params[:'cursor'] = opts[:'cursor'] if !opts[:'cursor'].nil?
      query_params[:'included_fields'] = opts[:'included_fields'] if !opts[:'included_fields'].nil?
      query_params[:'instance_id'] = opts[:'instance_id'] if !opts[:'instance_id'].nil?
      query_params[:'is_gateway'] = opts[:'is_gateway'] if !opts[:'is_gateway'].nil?
      query_params[:'logical_switch_id'] = opts[:'logical_switch_id'] if !opts[:'logical_switch_id'].nil?
      query_params[:'page_size'] = opts[:'page_size'] if !opts[:'page_size'].nil?
      query_params[:'public_ip'] = opts[:'public_ip'] if !opts[:'public_ip'].nil?
      query_params[:'quarantine_state'] = opts[:'quarantine_state'] if !opts[:'quarantine_state'].nil?
      query_params[:'region_id'] = opts[:'region_id'] if !opts[:'region_id'].nil?
      query_params[:'resource_type'] = opts[:'resource_type'] if !opts[:'resource_type'].nil?
      query_params[:'sort_ascending'] = opts[:'sort_ascending'] if !opts[:'sort_ascending'].nil?
      query_params[:'sort_by'] = opts[:'sort_by'] if !opts[:'sort_by'].nil?
      query_params[:'vpc_id'] = opts[:'vpc_id'] if !opts[:'vpc_id'].nil?

      # header parameters
      header_params = {}
      # HTTP header 'Accept' (if needed)
      header_params['Accept'] = @api_client.select_header_accept(['application/json'])
      # HTTP header 'Content-Type'
      header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

      # form parameters
      form_params = {}

      # http body (model)
      post_body = nil
      auth_names = ['BasicAuth']
      data, status_code, headers = @api_client.call_api(:GET, local_var_path,
        :header_params => header_params,
        :query_params => query_params,
        :form_params => form_params,
        :body => post_body,
        :auth_names => auth_names,
        :return_type => 'CloudVirtualMachinesListResult')
      if @api_client.config.debugging
        @api_client.config.logger.debug "API called: CloudServiceManagerApi#list_cloud_virtual_machines\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
      end
      return data, status_code, headers
    end

    # Returns a list of NSX Manager accounts
    # Returns a list of NSX Manager accounts
    # @param [Hash] opts the optional parameters
    # @return [NsxManagerAccountsListResult]
    def list_nsx_manager_accounts(opts = {})
      data, _status_code, _headers = list_nsx_manager_accounts_with_http_info(opts)
      return data
    end

    # Returns a list of NSX Manager accounts
    # Returns a list of NSX Manager accounts
    # @param [Hash] opts the optional parameters
    # @return [Array<(NsxManagerAccountsListResult, Fixnum, Hash)>] NsxManagerAccountsListResult data, response status code and response headers
    def list_nsx_manager_accounts_with_http_info(opts = {})
      if @api_client.config.debugging
        @api_client.config.logger.debug "Calling API: CloudServiceManagerApi.list_nsx_manager_accounts ..."
      end
      # resource path
      local_var_path = "/csm/nsx-manager-accounts"

      # query parameters
      query_params = {}

      # header parameters
      header_params = {}
      # HTTP header 'Accept' (if needed)
      header_params['Accept'] = @api_client.select_header_accept(['application/json'])
      # HTTP header 'Content-Type'
      header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

      # form parameters
      form_params = {}

      # http body (model)
      post_body = nil
      auth_names = ['BasicAuth']
      data, status_code, headers = @api_client.call_api(:GET, local_var_path,
        :header_params => header_params,
        :query_params => query_params,
        :form_params => form_params,
        :body => post_body,
        :auth_names => auth_names,
        :return_type => 'NsxManagerAccountsListResult')
      if @api_client.config.debugging
        @api_client.config.logger.debug "API called: CloudServiceManagerApi#list_nsx_manager_accounts\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
      end
      return data, status_code, headers
    end

    # Returns the particular NSX Manager account information
    # Returns the particular NSX Manager account information
    # @param account_id ID of NSX Manager account
    # @param [Hash] opts the optional parameters
    # @return [NsxManagerAccount]
    def nsx_manager_account_info(account_id, opts = {})
      data, _status_code, _headers = nsx_manager_account_info_with_http_info(account_id, opts)
      return data
    end

    # Returns the particular NSX Manager account information
    # Returns the particular NSX Manager account information
    # @param account_id ID of NSX Manager account
    # @param [Hash] opts the optional parameters
    # @return [Array<(NsxManagerAccount, Fixnum, Hash)>] NsxManagerAccount data, response status code and response headers
    def nsx_manager_account_info_with_http_info(account_id, opts = {})
      if @api_client.config.debugging
        @api_client.config.logger.debug "Calling API: CloudServiceManagerApi.nsx_manager_account_info ..."
      end
      # verify the required parameter 'account_id' is set
      if @api_client.config.client_side_validation && account_id.nil?
        fail ArgumentError, "Missing the required parameter 'account_id' when calling CloudServiceManagerApi.nsx_manager_account_info"
      end
      # resource path
      local_var_path = "/csm/nsx-manager-accounts/{account-id}".sub('{' + 'account-id' + '}', account_id.to_s)

      # query parameters
      query_params = {}

      # header parameters
      header_params = {}
      # HTTP header 'Accept' (if needed)
      header_params['Accept'] = @api_client.select_header_accept(['application/json'])
      # HTTP header 'Content-Type'
      header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

      # form parameters
      form_params = {}

      # http body (model)
      post_body = nil
      auth_names = ['BasicAuth']
      data, status_code, headers = @api_client.call_api(:GET, local_var_path,
        :header_params => header_params,
        :query_params => query_params,
        :form_params => form_params,
        :body => post_body,
        :auth_names => auth_names,
        :return_type => 'NsxManagerAccount')
      if @api_client.config.debugging
        @api_client.config.logger.debug "API called: CloudServiceManagerApi#nsx_manager_account_info\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
      end
      return data, status_code, headers
    end

    # Registers a AWS Gateway AMI for the region specified in the body. One can register only one gateway AMI ID per region. If a gateway AMI is already registered with a region, user is expected to use update API to overwrite the registerd AMI for a region. 
    # Registers a AWS Gateway AMI for the region specified in the body. One can register only one gateway AMI ID per region. If a gateway AMI is already registered with a region, user is expected to use update API to overwrite the registerd AMI for a region. 
    # @param aws_gateway_ami_info 
    # @param [Hash] opts the optional parameters
    # @return [AwsGatewayAmiInfo]
    def register_aws_gateway_ami(aws_gateway_ami_info, opts = {})
      data, _status_code, _headers = register_aws_gateway_ami_with_http_info(aws_gateway_ami_info, opts)
      return data
    end

    # Registers a AWS Gateway AMI for the region specified in the body. One can register only one gateway AMI ID per region. If a gateway AMI is already registered with a region, user is expected to use update API to overwrite the registerd AMI for a region. 
    # Registers a AWS Gateway AMI for the region specified in the body. One can register only one gateway AMI ID per region. If a gateway AMI is already registered with a region, user is expected to use update API to overwrite the registerd AMI for a region. 
    # @param aws_gateway_ami_info 
    # @param [Hash] opts the optional parameters
    # @return [Array<(AwsGatewayAmiInfo, Fixnum, Hash)>] AwsGatewayAmiInfo data, response status code and response headers
    def register_aws_gateway_ami_with_http_info(aws_gateway_ami_info, opts = {})
      if @api_client.config.debugging
        @api_client.config.logger.debug "Calling API: CloudServiceManagerApi.register_aws_gateway_ami ..."
      end
      # verify the required parameter 'aws_gateway_ami_info' is set
      if @api_client.config.client_side_validation && aws_gateway_ami_info.nil?
        fail ArgumentError, "Missing the required parameter 'aws_gateway_ami_info' when calling CloudServiceManagerApi.register_aws_gateway_ami"
      end
      # resource path
      local_var_path = "/csm/aws/gateway-amis"

      # query parameters
      query_params = {}

      # header parameters
      header_params = {}
      # HTTP header 'Accept' (if needed)
      header_params['Accept'] = @api_client.select_header_accept(['application/json'])
      # HTTP header 'Content-Type'
      header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

      # form parameters
      form_params = {}

      # http body (model)
      post_body = @api_client.object_to_http_body(aws_gateway_ami_info)
      auth_names = ['BasicAuth']
      data, status_code, headers = @api_client.call_api(:POST, local_var_path,
        :header_params => header_params,
        :query_params => query_params,
        :form_params => form_params,
        :body => post_body,
        :auth_names => auth_names,
        :return_type => 'AwsGatewayAmiInfo')
      if @api_client.config.debugging
        @api_client.config.logger.debug "API called: CloudServiceManagerApi#register_aws_gateway_ami\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
      end
      return data, status_code, headers
    end

    # Synchronizes Aws account related inventory like Regions, Vpcs, Instances Status of inventory synchronization can be known from Aws account status api 
    # Synchronizes Aws account related inventory like Regions, Vpcs, Instances Status of inventory synchronization can be known from Aws account status api 
    # @param account_id ID of AWS account
    # @param [Hash] opts the optional parameters
    # @return [nil]
    def sync_aws_account_inventory_sync_inventory(account_id, opts = {})
      sync_aws_account_inventory_sync_inventory_with_http_info(account_id, opts)
      return nil
    end

    # Synchronizes Aws account related inventory like Regions, Vpcs, Instances Status of inventory synchronization can be known from Aws account status api 
    # Synchronizes Aws account related inventory like Regions, Vpcs, Instances Status of inventory synchronization can be known from Aws account status api 
    # @param account_id ID of AWS account
    # @param [Hash] opts the optional parameters
    # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
    def sync_aws_account_inventory_sync_inventory_with_http_info(account_id, opts = {})
      if @api_client.config.debugging
        @api_client.config.logger.debug "Calling API: CloudServiceManagerApi.sync_aws_account_inventory_sync_inventory ..."
      end
      # verify the required parameter 'account_id' is set
      if @api_client.config.client_side_validation && account_id.nil?
        fail ArgumentError, "Missing the required parameter 'account_id' when calling CloudServiceManagerApi.sync_aws_account_inventory_sync_inventory"
      end
      # resource path
      local_var_path = "/csm/aws/accounts/{account-id}?action=sync_inventory".sub('{' + 'account-id' + '}', account_id.to_s)

      # query parameters
      query_params = {}

      # header parameters
      header_params = {}
      # HTTP header 'Accept' (if needed)
      header_params['Accept'] = @api_client.select_header_accept(['application/json'])
      # HTTP header 'Content-Type'
      header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

      # form parameters
      form_params = {}

      # http body (model)
      post_body = nil
      auth_names = ['BasicAuth']
      data, status_code, headers = @api_client.call_api(:POST, local_var_path,
        :header_params => header_params,
        :query_params => query_params,
        :form_params => form_params,
        :body => post_body,
        :auth_names => auth_names)
      if @api_client.config.debugging
        @api_client.config.logger.debug "API called: CloudServiceManagerApi#sync_aws_account_inventory_sync_inventory\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
      end
      return data, status_code, headers
    end

    # All the required configuration to undeploy Aws gateways will be absorbed as a part of request body in this api and gateway undeployment will be triggered. 
    # All the required configuration to undeploy Aws gateways will be absorbed as a part of request body in this api and gateway undeployment will be triggered. 
    # @param aws_gateway_undeploy_config 
    # @param [Hash] opts the optional parameters
    # @return [nil]
    def undeploy_aws_gateway_undeploy(aws_gateway_undeploy_config, opts = {})
      undeploy_aws_gateway_undeploy_with_http_info(aws_gateway_undeploy_config, opts)
      return nil
    end

    # All the required configuration to undeploy Aws gateways will be absorbed as a part of request body in this api and gateway undeployment will be triggered. 
    # All the required configuration to undeploy Aws gateways will be absorbed as a part of request body in this api and gateway undeployment will be triggered. 
    # @param aws_gateway_undeploy_config 
    # @param [Hash] opts the optional parameters
    # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
    def undeploy_aws_gateway_undeploy_with_http_info(aws_gateway_undeploy_config, opts = {})
      if @api_client.config.debugging
        @api_client.config.logger.debug "Calling API: CloudServiceManagerApi.undeploy_aws_gateway_undeploy ..."
      end
      # verify the required parameter 'aws_gateway_undeploy_config' is set
      if @api_client.config.client_side_validation && aws_gateway_undeploy_config.nil?
        fail ArgumentError, "Missing the required parameter 'aws_gateway_undeploy_config' when calling CloudServiceManagerApi.undeploy_aws_gateway_undeploy"
      end
      # resource path
      local_var_path = "/csm/aws/gateways?action=undeploy"

      # query parameters
      query_params = {}

      # header parameters
      header_params = {}
      # HTTP header 'Accept' (if needed)
      header_params['Accept'] = @api_client.select_header_accept(['application/json'])
      # HTTP header 'Content-Type'
      header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

      # form parameters
      form_params = {}

      # http body (model)
      post_body = @api_client.object_to_http_body(aws_gateway_undeploy_config)
      auth_names = ['BasicAuth']
      data, status_code, headers = @api_client.call_api(:POST, local_var_path,
        :header_params => header_params,
        :query_params => query_params,
        :form_params => form_params,
        :body => post_body,
        :auth_names => auth_names)
      if @api_client.config.debugging
        @api_client.config.logger.debug "API called: CloudServiceManagerApi#undeploy_aws_gateway_undeploy\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
      end
      return data, status_code, headers
    end

    # Update a AWS account information
    # Update a AWS account information
    # @param account_id ID of AWS account
    # @param aws_account 
    # @param [Hash] opts the optional parameters
    # @return [AwsAccount]
    def update_aws_account(account_id, aws_account, opts = {})
      data, _status_code, _headers = update_aws_account_with_http_info(account_id, aws_account, opts)
      return data
    end

    # Update a AWS account information
    # Update a AWS account information
    # @param account_id ID of AWS account
    # @param aws_account 
    # @param [Hash] opts the optional parameters
    # @return [Array<(AwsAccount, Fixnum, Hash)>] AwsAccount data, response status code and response headers
    def update_aws_account_with_http_info(account_id, aws_account, opts = {})
      if @api_client.config.debugging
        @api_client.config.logger.debug "Calling API: CloudServiceManagerApi.update_aws_account ..."
      end
      # verify the required parameter 'account_id' is set
      if @api_client.config.client_side_validation && account_id.nil?
        fail ArgumentError, "Missing the required parameter 'account_id' when calling CloudServiceManagerApi.update_aws_account"
      end
      # verify the required parameter 'aws_account' is set
      if @api_client.config.client_side_validation && aws_account.nil?
        fail ArgumentError, "Missing the required parameter 'aws_account' when calling CloudServiceManagerApi.update_aws_account"
      end
      # resource path
      local_var_path = "/csm/aws/accounts/{account-id}".sub('{' + 'account-id' + '}', account_id.to_s)

      # query parameters
      query_params = {}

      # header parameters
      header_params = {}
      # HTTP header 'Accept' (if needed)
      header_params['Accept'] = @api_client.select_header_accept(['application/json'])
      # HTTP header 'Content-Type'
      header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

      # form parameters
      form_params = {}

      # http body (model)
      post_body = @api_client.object_to_http_body(aws_account)
      auth_names = ['BasicAuth']
      data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
        :header_params => header_params,
        :query_params => query_params,
        :form_params => form_params,
        :body => post_body,
        :auth_names => auth_names,
        :return_type => 'AwsAccount')
      if @api_client.config.debugging
        @api_client.config.logger.debug "API called: CloudServiceManagerApi#update_aws_account\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
      end
      return data, status_code, headers
    end

    # Update a AWS Gateway AMI
    # Update a AWS Gateway AMI
    # @param region_id ID of AWS region
    # @param aws_gateway_ami_info 
    # @param [Hash] opts the optional parameters
    # @return [AwsGatewayAmiInfo]
    def update_aws_gateway_ami(region_id, aws_gateway_ami_info, opts = {})
      data, _status_code, _headers = update_aws_gateway_ami_with_http_info(region_id, aws_gateway_ami_info, opts)
      return data
    end

    # Update a AWS Gateway AMI
    # Update a AWS Gateway AMI
    # @param region_id ID of AWS region
    # @param aws_gateway_ami_info 
    # @param [Hash] opts the optional parameters
    # @return [Array<(AwsGatewayAmiInfo, Fixnum, Hash)>] AwsGatewayAmiInfo data, response status code and response headers
    def update_aws_gateway_ami_with_http_info(region_id, aws_gateway_ami_info, opts = {})
      if @api_client.config.debugging
        @api_client.config.logger.debug "Calling API: CloudServiceManagerApi.update_aws_gateway_ami ..."
      end
      # verify the required parameter 'region_id' is set
      if @api_client.config.client_side_validation && region_id.nil?
        fail ArgumentError, "Missing the required parameter 'region_id' when calling CloudServiceManagerApi.update_aws_gateway_ami"
      end
      # verify the required parameter 'aws_gateway_ami_info' is set
      if @api_client.config.client_side_validation && aws_gateway_ami_info.nil?
        fail ArgumentError, "Missing the required parameter 'aws_gateway_ami_info' when calling CloudServiceManagerApi.update_aws_gateway_ami"
      end
      # resource path
      local_var_path = "/csm/aws/gateway-amis/{region-id}".sub('{' + 'region-id' + '}', region_id.to_s)

      # query parameters
      query_params = {}

      # header parameters
      header_params = {}
      # HTTP header 'Accept' (if needed)
      header_params['Accept'] = @api_client.select_header_accept(['application/json'])
      # HTTP header 'Content-Type'
      header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

      # form parameters
      form_params = {}

      # http body (model)
      post_body = @api_client.object_to_http_body(aws_gateway_ami_info)
      auth_names = ['BasicAuth']
      data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
        :header_params => header_params,
        :query_params => query_params,
        :form_params => form_params,
        :body => post_body,
        :auth_names => auth_names,
        :return_type => 'AwsGatewayAmiInfo')
      if @api_client.config.debugging
        @api_client.config.logger.debug "API called: CloudServiceManagerApi#update_aws_gateway_ami\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
      end
      return data, status_code, headers
    end

    # Updates configuration for primary gateway and secondary gateway for the vpc, if exists. 
    # Updates configuration for primary gateway and secondary gateway for the vpc, if exists. 
    # @param vpc_id 
    # @param aws_gateway_deploy_config 
    # @param [Hash] opts the optional parameters
    # @return [AwsGatewayDeployConfig]
    def update_aws_gateway_config(vpc_id, aws_gateway_deploy_config, opts = {})
      data, _status_code, _headers = update_aws_gateway_config_with_http_info(vpc_id, aws_gateway_deploy_config, opts)
      return data
    end

    # Updates configuration for primary gateway and secondary gateway for the vpc, if exists. 
    # Updates configuration for primary gateway and secondary gateway for the vpc, if exists. 
    # @param vpc_id 
    # @param aws_gateway_deploy_config 
    # @param [Hash] opts the optional parameters
    # @return [Array<(AwsGatewayDeployConfig, Fixnum, Hash)>] AwsGatewayDeployConfig data, response status code and response headers
    def update_aws_gateway_config_with_http_info(vpc_id, aws_gateway_deploy_config, opts = {})
      if @api_client.config.debugging
        @api_client.config.logger.debug "Calling API: CloudServiceManagerApi.update_aws_gateway_config ..."
      end
      # verify the required parameter 'vpc_id' is set
      if @api_client.config.client_side_validation && vpc_id.nil?
        fail ArgumentError, "Missing the required parameter 'vpc_id' when calling CloudServiceManagerApi.update_aws_gateway_config"
      end
      # verify the required parameter 'aws_gateway_deploy_config' is set
      if @api_client.config.client_side_validation && aws_gateway_deploy_config.nil?
        fail ArgumentError, "Missing the required parameter 'aws_gateway_deploy_config' when calling CloudServiceManagerApi.update_aws_gateway_config"
      end
      # resource path
      local_var_path = "/csm/aws/gateways/{vpc-id}".sub('{' + 'vpc-id' + '}', vpc_id.to_s)

      # query parameters
      query_params = {}

      # header parameters
      header_params = {}
      # HTTP header 'Accept' (if needed)
      header_params['Accept'] = @api_client.select_header_accept(['application/json'])
      # HTTP header 'Content-Type'
      header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

      # form parameters
      form_params = {}

      # http body (model)
      post_body = @api_client.object_to_http_body(aws_gateway_deploy_config)
      auth_names = ['BasicAuth']
      data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
        :header_params => header_params,
        :query_params => query_params,
        :form_params => form_params,
        :body => post_body,
        :auth_names => auth_names,
        :return_type => 'AwsGatewayDeployConfig')
      if @api_client.config.debugging
        @api_client.config.logger.debug "API called: CloudServiceManagerApi#update_aws_gateway_config\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
      end
      return data, status_code, headers
    end

    # Update a NSX Manager account
    # Update a NSX Manager account
    # @param account_id ID of NSX Manager account
    # @param nsx_manager_account 
    # @param [Hash] opts the optional parameters
    # @return [NsxManagerAccount]
    def update_nsx_manager_account(account_id, nsx_manager_account, opts = {})
      data, _status_code, _headers = update_nsx_manager_account_with_http_info(account_id, nsx_manager_account, opts)
      return data
    end

    # Update a NSX Manager account
    # Update a NSX Manager account
    # @param account_id ID of NSX Manager account
    # @param nsx_manager_account 
    # @param [Hash] opts the optional parameters
    # @return [Array<(NsxManagerAccount, Fixnum, Hash)>] NsxManagerAccount data, response status code and response headers
    def update_nsx_manager_account_with_http_info(account_id, nsx_manager_account, opts = {})
      if @api_client.config.debugging
        @api_client.config.logger.debug "Calling API: CloudServiceManagerApi.update_nsx_manager_account ..."
      end
      # verify the required parameter 'account_id' is set
      if @api_client.config.client_side_validation && account_id.nil?
        fail ArgumentError, "Missing the required parameter 'account_id' when calling CloudServiceManagerApi.update_nsx_manager_account"
      end
      # verify the required parameter 'nsx_manager_account' is set
      if @api_client.config.client_side_validation && nsx_manager_account.nil?
        fail ArgumentError, "Missing the required parameter 'nsx_manager_account' when calling CloudServiceManagerApi.update_nsx_manager_account"
      end
      # resource path
      local_var_path = "/csm/nsx-manager-accounts/{account-id}".sub('{' + 'account-id' + '}', account_id.to_s)

      # query parameters
      query_params = {}

      # header parameters
      header_params = {}
      # HTTP header 'Accept' (if needed)
      header_params['Accept'] = @api_client.select_header_accept(['application/json'])
      # HTTP header 'Content-Type'
      header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

      # form parameters
      form_params = {}

      # http body (model)
      post_body = @api_client.object_to_http_body(nsx_manager_account)
      auth_names = ['BasicAuth']
      data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
        :header_params => header_params,
        :query_params => query_params,
        :form_params => form_params,
        :body => post_body,
        :auth_names => auth_names,
        :return_type => 'NsxManagerAccount')
      if @api_client.config.debugging
        @api_client.config.logger.debug "API called: CloudServiceManagerApi#update_nsx_manager_account\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
      end
      return data, status_code, headers
    end
  end
end
