-
Notifications
You must be signed in to change notification settings - Fork 597
/
api_op_DescribeEventCategories.go
128 lines (105 loc) · 3.83 KB
/
api_op_DescribeEventCategories.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
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
package databasemigrationservice
import (
"context"
"fmt"
"github.com/aws/aws-sdk-go-v2/aws"
"github.com/aws/aws-sdk-go-v2/internal/awsutil"
)
type DescribeEventCategoriesInput struct {
_ struct{} `type:"structure"`
// Filters applied to the action.
Filters []Filter `type:"list"`
// The type of AWS DMS resource that generates events.
//
// Valid values: replication-instance | replication-task
SourceType *string `type:"string"`
}
// String returns the string representation
func (s DescribeEventCategoriesInput) String() string {
return awsutil.Prettify(s)
}
// Validate inspects the fields of the type to determine if they are valid.
func (s *DescribeEventCategoriesInput) Validate() error {
invalidParams := aws.ErrInvalidParams{Context: "DescribeEventCategoriesInput"}
if s.Filters != nil {
for i, v := range s.Filters {
if err := v.Validate(); err != nil {
invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Filters", i), err.(aws.ErrInvalidParams))
}
}
}
if invalidParams.Len() > 0 {
return invalidParams
}
return nil
}
type DescribeEventCategoriesOutput struct {
_ struct{} `type:"structure"`
// A list of event categories.
EventCategoryGroupList []EventCategoryGroup `type:"list"`
}
// String returns the string representation
func (s DescribeEventCategoriesOutput) String() string {
return awsutil.Prettify(s)
}
const opDescribeEventCategories = "DescribeEventCategories"
// DescribeEventCategoriesRequest returns a request value for making API operation for
// AWS Database Migration Service.
//
// Lists categories for all event source types, or, if specified, for a specified
// source type. You can see a list of the event categories and source types
// in Working with Events and Notifications (https://docs.aws.amazon.com/dms/latest/userguide/CHAP_Events.html)
// in the AWS Database Migration Service User Guide.
//
// // Example sending a request using DescribeEventCategoriesRequest.
// req := client.DescribeEventCategoriesRequest(params)
// resp, err := req.Send(context.TODO())
// if err == nil {
// fmt.Println(resp)
// }
//
// Please also see https://docs.aws.amazon.com/goto/WebAPI/dms-2016-01-01/DescribeEventCategories
func (c *Client) DescribeEventCategoriesRequest(input *DescribeEventCategoriesInput) DescribeEventCategoriesRequest {
op := &aws.Operation{
Name: opDescribeEventCategories,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &DescribeEventCategoriesInput{}
}
req := c.newRequest(op, input, &DescribeEventCategoriesOutput{})
return DescribeEventCategoriesRequest{Request: req, Input: input, Copy: c.DescribeEventCategoriesRequest}
}
// DescribeEventCategoriesRequest is the request type for the
// DescribeEventCategories API operation.
type DescribeEventCategoriesRequest struct {
*aws.Request
Input *DescribeEventCategoriesInput
Copy func(*DescribeEventCategoriesInput) DescribeEventCategoriesRequest
}
// Send marshals and sends the DescribeEventCategories API request.
func (r DescribeEventCategoriesRequest) Send(ctx context.Context) (*DescribeEventCategoriesResponse, error) {
r.Request.SetContext(ctx)
err := r.Request.Send()
if err != nil {
return nil, err
}
resp := &DescribeEventCategoriesResponse{
DescribeEventCategoriesOutput: r.Request.Data.(*DescribeEventCategoriesOutput),
response: &aws.Response{Request: r.Request},
}
return resp, nil
}
// DescribeEventCategoriesResponse is the response type for the
// DescribeEventCategories API operation.
type DescribeEventCategoriesResponse struct {
*DescribeEventCategoriesOutput
response *aws.Response
}
// SDKResponseMetdata returns the response metadata for the
// DescribeEventCategories request.
func (r *DescribeEventCategoriesResponse) SDKResponseMetdata() *aws.Response {
return r.response
}