// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.

package iot

import (
	"context"

	"github.com/aws/aws-sdk-go-v2/aws"
	"github.com/aws/aws-sdk-go-v2/internal/awsutil"
	"github.com/aws/aws-sdk-go-v2/private/protocol"
)

type ClearDefaultAuthorizerInput struct {
	_ struct{} `type:"structure"`
}

// String returns the string representation
func (s ClearDefaultAuthorizerInput) String() string {
	return awsutil.Prettify(s)
}

// MarshalFields encodes the AWS API shape using the passed in protocol encoder.
func (s ClearDefaultAuthorizerInput) MarshalFields(e protocol.FieldEncoder) error {

	return nil
}

type ClearDefaultAuthorizerOutput struct {
	_ struct{} `type:"structure"`
}

// String returns the string representation
func (s ClearDefaultAuthorizerOutput) String() string {
	return awsutil.Prettify(s)
}

// MarshalFields encodes the AWS API shape using the passed in protocol encoder.
func (s ClearDefaultAuthorizerOutput) MarshalFields(e protocol.FieldEncoder) error {
	return nil
}

const opClearDefaultAuthorizer = "ClearDefaultAuthorizer"

// ClearDefaultAuthorizerRequest returns a request value for making API operation for
// AWS IoT.
//
// Clears the default authorizer.
//
//    // Example sending a request using ClearDefaultAuthorizerRequest.
//    req := client.ClearDefaultAuthorizerRequest(params)
//    resp, err := req.Send(context.TODO())
//    if err == nil {
//        fmt.Println(resp)
//    }
func (c *Client) ClearDefaultAuthorizerRequest(input *ClearDefaultAuthorizerInput) ClearDefaultAuthorizerRequest {
	op := &aws.Operation{
		Name:       opClearDefaultAuthorizer,
		HTTPMethod: "DELETE",
		HTTPPath:   "/default-authorizer",
	}

	if input == nil {
		input = &ClearDefaultAuthorizerInput{}
	}

	req := c.newRequest(op, input, &ClearDefaultAuthorizerOutput{})
	return ClearDefaultAuthorizerRequest{Request: req, Input: input, Copy: c.ClearDefaultAuthorizerRequest}
}

// ClearDefaultAuthorizerRequest is the request type for the
// ClearDefaultAuthorizer API operation.
type ClearDefaultAuthorizerRequest struct {
	*aws.Request
	Input *ClearDefaultAuthorizerInput
	Copy  func(*ClearDefaultAuthorizerInput) ClearDefaultAuthorizerRequest
}

// Send marshals and sends the ClearDefaultAuthorizer API request.
func (r ClearDefaultAuthorizerRequest) Send(ctx context.Context) (*ClearDefaultAuthorizerResponse, error) {
	r.Request.SetContext(ctx)
	err := r.Request.Send()
	if err != nil {
		return nil, err
	}

	resp := &ClearDefaultAuthorizerResponse{
		ClearDefaultAuthorizerOutput: r.Request.Data.(*ClearDefaultAuthorizerOutput),
		response:                     &aws.Response{Request: r.Request},
	}

	return resp, nil
}

// ClearDefaultAuthorizerResponse is the response type for the
// ClearDefaultAuthorizer API operation.
type ClearDefaultAuthorizerResponse struct {
	*ClearDefaultAuthorizerOutput

	response *aws.Response
}

// SDKResponseMetdata returns the response metadata for the
// ClearDefaultAuthorizer request.
func (r *ClearDefaultAuthorizerResponse) SDKResponseMetdata() *aws.Response {
	return r.response
}
