def deploy(environment_options, client, region = 'AWS_REGION')
      super
      puts "Deploying API: #{@api_name} to Environment: #{environment_options.name}"
      @stage_variables = environment_options.variables || {}
      @stage_variables.store('environment', environment_options.name)

      api_id = get_id_for_api(@api_name)
      service_response =
        if api_id
          options = {
            fail_on_warnings: false, mode: @import_mode, rest_api_id:
            api_id, body: File.binread(@path_to_swagger_file)
          }
          @client.put_rest_api(options)
        else
          options = {
            fail_on_warnings: false,
            body: File.binread(@path_to_swagger_file)
          }
          @client.import_rest_api(options)
        end

      raise "Failed to create API gateway with name #{@api_name}" if service_response.nil? || service_response.id.nil?

      if api_id
        "Created API Gateway Object: #{@api_name} having id #{service_response.id}"
      else
        "Updated API Gateway Object: #{@api_name} having id #{service_response.id}"
      end

      create_stage(service_response.id, environment_options)

      service_uri = "https://#{service_response.id}.execute-api.#{@region}.amazonaws.com/#{environment_options.name}/"

      puts "API: #{@api_name} deployed at #{service_uri}"

      service_uri
    end
def deploy(environment_options, client, region = 'AWS_REGION')
      super
      puts "Deploying API: #{@api_name} to Environment: #{environment_options.name}"
      @stage_variables = environment_options.variables || {}
      @stage_variables.store('environment', environment_options.name)

      api_id = get_id_for_api(@api_name)
      service_response =
        if api_id
          options = {
            fail_on_warnings: false, mode: @import_mode, rest_api_id:
            api_id, body: File.binread(@path_to_swagger_file)
          }
          @client.put_rest_api(options)
        else
          options = {
            fail_on_warnings: false,
            body: File.binread(@path_to_swagger_file)
          }
          @client.import_rest_api(options)
        end

      raise "Failed to create API gateway with name #{@api_name}" if service_response.nil? || service_response.id.nil?

      if api_id
        "Created API Gateway Object: #{@api_name} having id #{service_response.id}"
      else
        "Updated API Gateway Object: #{@api_name} having id #{service_response.id}"
      end

      create_stage(service_response.id, environment_options)

      service_uri = "https://#{service_response.id}.execute-api.#{@region}.amazonaws.com/#{environment_options.name}/"

      puts "API: #{@api_name} deployed at #{service_uri}"

      service_uri
    end
Initializes the APIGateway Manager Object. A significant majority of the configuration of your
 API should be configured through your Swagger File (e.g. Integrations, API Name, Version).

 @param [Hash] options The Options initialize the API Gateway Manager with.
 @option options [String] :path_to_swagger_file File path the Swagger File to load and parse.
 @option options [String] :import_mode (overwrite) How the API Gateway Object will handle updates.
  Accepts <tt>overwrite</tt> and <tt>merge</tt>.
 Deploys the API Gateway Object to a specified environment

 @param environment_options [LambdaWrap::Environment] The environment to deploy
 @param client [Aws::APIGateway::Client] Client to use with SDK. Should be passed in by the API class.
 @param region [String] AWS Region string. Should be passed in by the API class.