=begin
#ESP Documentation

#The Evident Security Platform API (version 2.0) is designed to allow users granular control over their Amazon Web Service security experience by allowing them to review alerts, monitor signatures, and create custom signatures.

OpenAPI spec version: v2_sdk

Generated by: https://github.com/swagger-api/swagger-codegen.git

=end

require "uri"

module ESP
  class CustomComplianceStandardsApi
    attr_accessor :api_client

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

    # Create a(n) Custom Compliance Standard
    # 
    # @param description The description for this Compliance Standard
    # @param name Name
    # @param [Hash] opts the optional parameters
    # @option opts [String] :include Related objects that can be included in the response:  custom_compliance_domains, custom_compliance_controls See Including Objects for more information.
    # @return [CustomComplianceStandard]
    def create(description, name, opts = {})
      data, _status_code, _headers = create_with_http_info(description, name, opts)
      return data
    end

    # Create a(n) Custom Compliance Standard
    # 
    # @param description The description for this Compliance Standard
    # @param name Name
    # @param [Hash] opts the optional parameters
    # @option opts [String] :include Related objects that can be included in the response:  custom_compliance_domains, custom_compliance_controls See Including Objects for more information.
    # @return [Array<(CustomComplianceStandard, Fixnum, Hash)>] CustomComplianceStandard data, response status code and response headers
    def create_with_http_info(description, name, opts = {})
      if @api_client.config.debugging
        @api_client.config.logger.debug "Calling API: CustomComplianceStandardsApi.create ..."
      end
      # verify the required parameter 'description' is set
      fail ArgumentError, "Missing the required parameter 'description' when calling CustomComplianceStandardsApi.create" if description.nil?
      # verify the required parameter 'name' is set
      fail ArgumentError, "Missing the required parameter 'name' when calling CustomComplianceStandardsApi.create" if name.nil?
      # resource path
      local_var_path = "/api/v2/custom_compliance_standards.json_api".sub('{format}','json_api')

      # query parameters
      query_params = {}
      query_params[:'include'] = opts[:'include'] if !opts[:'include'].nil?

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

      # form parameters
      form_params = {}
      form_params["description"] = description
      form_params["name"] = name

      # http body (model)
      post_body = nil
      auth_names = []
      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 => 'CustomComplianceStandard')
      if @api_client.config.debugging
        @api_client.config.logger.debug "API called: CustomComplianceStandardsApi#create\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
      end
      return data, status_code, headers
    end

    # Delete a(n) Custom Compliance Standard
    # 
    # @param id Custom Compliance Standard ID
    # @param [Hash] opts the optional parameters
    # @return [Meta]
    def delete(id, opts = {})
      data, _status_code, _headers = delete_with_http_info(id, opts)
      return data
    end

    # Delete a(n) Custom Compliance Standard
    # 
    # @param id Custom Compliance Standard ID
    # @param [Hash] opts the optional parameters
    # @return [Array<(Meta, Fixnum, Hash)>] Meta data, response status code and response headers
    def delete_with_http_info(id, opts = {})
      if @api_client.config.debugging
        @api_client.config.logger.debug "Calling API: CustomComplianceStandardsApi.delete ..."
      end
      # verify the required parameter 'id' is set
      fail ArgumentError, "Missing the required parameter 'id' when calling CustomComplianceStandardsApi.delete" if id.nil?
      # resource path
      local_var_path = "/api/v2/custom_compliance_standards/{id}.json_api".sub('{format}','json_api').sub('{' + 'id' + '}', 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/vnd.api+json'])
      # HTTP header 'Content-Type'
      header_params['Content-Type'] = @api_client.select_header_content_type(['application/vnd.api+json'])

      # form parameters
      form_params = {}

      # http body (model)
      post_body = nil
      auth_names = []
      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,
        :return_type => 'Meta')
      if @api_client.config.debugging
        @api_client.config.logger.debug "API called: CustomComplianceStandardsApi#delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
      end
      return data, status_code, headers
    end

    # Show a single Custom Compliance Standard
    # 
    # @param id Custom Compliance Standard ID
    # @param [Hash] opts the optional parameters
    # @option opts [String] :include Related objects that can be included in the response:  custom_compliance_domains, custom_compliance_controls See Including Objects for more information.
    # @return [CustomComplianceStandard]
    def show(id, opts = {})
      data, _status_code, _headers = show_with_http_info(id, opts)
      return data
    end

    # Show a single Custom Compliance Standard
    # 
    # @param id Custom Compliance Standard ID
    # @param [Hash] opts the optional parameters
    # @option opts [String] :include Related objects that can be included in the response:  custom_compliance_domains, custom_compliance_controls See Including Objects for more information.
    # @return [Array<(CustomComplianceStandard, Fixnum, Hash)>] CustomComplianceStandard data, response status code and response headers
    def show_with_http_info(id, opts = {})
      if @api_client.config.debugging
        @api_client.config.logger.debug "Calling API: CustomComplianceStandardsApi.show ..."
      end
      # verify the required parameter 'id' is set
      fail ArgumentError, "Missing the required parameter 'id' when calling CustomComplianceStandardsApi.show" if id.nil?
      # resource path
      local_var_path = "/api/v2/custom_compliance_standards/{id}.json_api".sub('{format}','json_api').sub('{' + 'id' + '}', id.to_s)

      # query parameters
      query_params = {}
      query_params[:'include'] = opts[:'include'] if !opts[:'include'].nil?

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

      # form parameters
      form_params = {}

      # http body (model)
      post_body = nil
      auth_names = []
      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 => 'CustomComplianceStandard')
      if @api_client.config.debugging
        @api_client.config.logger.debug "API called: CustomComplianceStandardsApi#show\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
      end
      return data, status_code, headers
    end

    # Update a(n) Custom Compliance Standard
    # 
    # @param id Custom Compliance Standard ID
    # @param [Hash] opts the optional parameters
    # @option opts [String] :include Related objects that can be included in the response:  custom_compliance_domains, custom_compliance_controls See Including Objects for more information.
    # @option opts [String] :description The description for this Compliance Standard
    # @option opts [String] :name Name
    # @return [CustomComplianceStandard]
    def update(id, opts = {})
      data, _status_code, _headers = update_with_http_info(id, opts)
      return data
    end

    # Update a(n) Custom Compliance Standard
    # 
    # @param id Custom Compliance Standard ID
    # @param [Hash] opts the optional parameters
    # @option opts [String] :include Related objects that can be included in the response:  custom_compliance_domains, custom_compliance_controls See Including Objects for more information.
    # @option opts [String] :description The description for this Compliance Standard
    # @option opts [String] :name Name
    # @return [Array<(CustomComplianceStandard, Fixnum, Hash)>] CustomComplianceStandard data, response status code and response headers
    def update_with_http_info(id, opts = {})
      if @api_client.config.debugging
        @api_client.config.logger.debug "Calling API: CustomComplianceStandardsApi.update ..."
      end
      # verify the required parameter 'id' is set
      fail ArgumentError, "Missing the required parameter 'id' when calling CustomComplianceStandardsApi.update" if id.nil?
      # resource path
      local_var_path = "/api/v2/custom_compliance_standards/{id}.json_api".sub('{format}','json_api').sub('{' + 'id' + '}', id.to_s)

      # query parameters
      query_params = {}
      query_params[:'include'] = opts[:'include'] if !opts[:'include'].nil?

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

      # form parameters
      form_params = {}
      form_params["description"] = opts[:'description'] if !opts[:'description'].nil?
      form_params["name"] = opts[:'name'] if !opts[:'name'].nil?

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