-
Notifications
You must be signed in to change notification settings - Fork 623
/
api_op_ClearDefaultAuthorizer.go
108 lines (86 loc) · 3.12 KB
/
api_op_ClearDefaultAuthorizer.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
// 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 {
e.SetValue(protocol.HeaderTarget, "Content-Type", protocol.StringValue("application/json"), protocol.Metadata{})
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
}