repo_name
stringlengths
1
52
repo_creator
stringclasses
6 values
programming_language
stringclasses
4 values
code
stringlengths
0
9.68M
num_lines
int64
1
234k
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package waf import ( "context" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/waf/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // This is AWS WAF Classic documentation. For more information, see AWS WAF Classic (https://docs.aws.amazon.com/waf/latest/developerguide/classic-waf-chapter.html) // in the developer guide. For the latest version of AWS WAF, use the AWS WAFV2 API // and see the AWS WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html) // . With the latest version, AWS WAF has a single set of endpoints for regional // and global use. Inserts or deletes Predicate objects in a rule and updates the // RateLimit in the rule. Each Predicate object identifies a predicate, such as a // ByteMatchSet or an IPSet , that specifies the web requests that you want to // block or count. The RateLimit specifies the number of requests every five // minutes that triggers the rule. If you add more than one predicate to a // RateBasedRule , a request must match all the predicates and exceed the RateLimit // to be counted or blocked. For example, suppose you add the following to a // RateBasedRule : // - An IPSet that matches the IP address 192.0.2.44/32 // - A ByteMatchSet that matches BadBot in the User-Agent header // // Further, you specify a RateLimit of 1,000. You then add the RateBasedRule to a // WebACL and specify that you want to block requests that satisfy the rule. For a // request to be blocked, it must come from the IP address 192.0.2.44 and the // User-Agent header in the request must contain the value BadBot . Further, // requests that match these two conditions much be received at a rate of more than // 1,000 every five minutes. If the rate drops below this limit, AWS WAF no longer // blocks the requests. As a second example, suppose you want to limit requests to // a particular page on your site. To do this, you could add the following to a // RateBasedRule : // - A ByteMatchSet with FieldToMatch of URI // - A PositionalConstraint of STARTS_WITH // - A TargetString of login // // Further, you specify a RateLimit of 1,000. By adding this RateBasedRule to a // WebACL , you could limit requests to your login page without affecting the rest // of your site. func (c *Client) UpdateRateBasedRule(ctx context.Context, params *UpdateRateBasedRuleInput, optFns ...func(*Options)) (*UpdateRateBasedRuleOutput, error) { if params == nil { params = &UpdateRateBasedRuleInput{} } result, metadata, err := c.invokeOperation(ctx, "UpdateRateBasedRule", params, optFns, c.addOperationUpdateRateBasedRuleMiddlewares) if err != nil { return nil, err } out := result.(*UpdateRateBasedRuleOutput) out.ResultMetadata = metadata return out, nil } type UpdateRateBasedRuleInput struct { // The value returned by the most recent call to GetChangeToken . // // This member is required. ChangeToken *string // The maximum number of requests, which have an identical value in the field // specified by the RateKey , allowed in a five-minute period. If the number of // requests exceeds the RateLimit and the other predicates specified in the rule // are also met, AWS WAF triggers the action that is specified for this rule. // // This member is required. RateLimit int64 // The RuleId of the RateBasedRule that you want to update. RuleId is returned by // CreateRateBasedRule and by ListRateBasedRules . // // This member is required. RuleId *string // An array of RuleUpdate objects that you want to insert into or delete from a // RateBasedRule . // // This member is required. Updates []types.RuleUpdate noSmithyDocumentSerde } type UpdateRateBasedRuleOutput struct { // The ChangeToken that you used to submit the UpdateRateBasedRule request. You // can also use this value to query the status of the request. For more // information, see GetChangeTokenStatus . ChangeToken *string // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationUpdateRateBasedRuleMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson11_serializeOpUpdateRateBasedRule{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpUpdateRateBasedRule{}, middleware.After) if err != nil { return err } if err = addSetLoggerMiddleware(stack, options); err != nil { return err } if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { return err } if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { return err } if err = addRetryMiddlewares(stack, options); err != nil { return err } if err = addHTTPSignerV4Middleware(stack, options); err != nil { return err } if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { return err } if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack); err != nil { return err } if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { return err } if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } if err = addOpUpdateRateBasedRuleValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateRateBasedRule(options.Region), middleware.Before); err != nil { return err } if err = awsmiddleware.AddRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { return err } if err = addResponseErrorMiddleware(stack); err != nil { return err } if err = addRequestResponseLogging(stack, options); err != nil { return err } return nil } func newServiceMetadataMiddleware_opUpdateRateBasedRule(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "waf", OperationName: "UpdateRateBasedRule", } }
177
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package waf import ( "context" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/waf/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // This is AWS WAF Classic documentation. For more information, see AWS WAF Classic (https://docs.aws.amazon.com/waf/latest/developerguide/classic-waf-chapter.html) // in the developer guide. For the latest version of AWS WAF, use the AWS WAFV2 API // and see the AWS WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html) // . With the latest version, AWS WAF has a single set of endpoints for regional // and global use. Inserts or deletes RegexMatchTuple objects (filters) in a // RegexMatchSet . For each RegexMatchSetUpdate object, you specify the following // values: // - Whether to insert or delete the object from the array. If you want to // change a RegexMatchSetUpdate object, you delete the existing object and add a // new one. // - The part of a web request that you want AWS WAF to inspectupdate, such as a // query string or the value of the User-Agent header. // - The identifier of the pattern (a regular expression) that you want AWS WAF // to look for. For more information, see RegexPatternSet . // - Whether to perform any conversions on the request, such as converting it to // lowercase, before inspecting it for the specified string. // // For example, you can create a RegexPatternSet that matches any requests with // User-Agent headers that contain the string B[a@]dB[o0]t . You can then configure // AWS WAF to reject those requests. To create and configure a RegexMatchSet , // perform the following steps: // - Create a RegexMatchSet. For more information, see CreateRegexMatchSet . // - Use GetChangeToken to get the change token that you provide in the // ChangeToken parameter of an UpdateRegexMatchSet request. // - Submit an UpdateRegexMatchSet request to specify the part of the request // that you want AWS WAF to inspect (for example, the header or the URI) and the // identifier of the RegexPatternSet that contain the regular expression patters // you want AWS WAF to watch for. // // For more information about how to use the AWS WAF API to allow or block HTTP // requests, see the AWS WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/) // . func (c *Client) UpdateRegexMatchSet(ctx context.Context, params *UpdateRegexMatchSetInput, optFns ...func(*Options)) (*UpdateRegexMatchSetOutput, error) { if params == nil { params = &UpdateRegexMatchSetInput{} } result, metadata, err := c.invokeOperation(ctx, "UpdateRegexMatchSet", params, optFns, c.addOperationUpdateRegexMatchSetMiddlewares) if err != nil { return nil, err } out := result.(*UpdateRegexMatchSetOutput) out.ResultMetadata = metadata return out, nil } type UpdateRegexMatchSetInput struct { // The value returned by the most recent call to GetChangeToken . // // This member is required. ChangeToken *string // The RegexMatchSetId of the RegexMatchSet that you want to update. // RegexMatchSetId is returned by CreateRegexMatchSet and by ListRegexMatchSets . // // This member is required. RegexMatchSetId *string // An array of RegexMatchSetUpdate objects that you want to insert into or delete // from a RegexMatchSet . For more information, see RegexMatchTuple . // // This member is required. Updates []types.RegexMatchSetUpdate noSmithyDocumentSerde } type UpdateRegexMatchSetOutput struct { // The ChangeToken that you used to submit the UpdateRegexMatchSet request. You // can also use this value to query the status of the request. For more // information, see GetChangeTokenStatus . ChangeToken *string // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationUpdateRegexMatchSetMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson11_serializeOpUpdateRegexMatchSet{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpUpdateRegexMatchSet{}, middleware.After) if err != nil { return err } if err = addSetLoggerMiddleware(stack, options); err != nil { return err } if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { return err } if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { return err } if err = addRetryMiddlewares(stack, options); err != nil { return err } if err = addHTTPSignerV4Middleware(stack, options); err != nil { return err } if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { return err } if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack); err != nil { return err } if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { return err } if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } if err = addOpUpdateRegexMatchSetValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateRegexMatchSet(options.Region), middleware.Before); err != nil { return err } if err = awsmiddleware.AddRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { return err } if err = addResponseErrorMiddleware(stack); err != nil { return err } if err = addRequestResponseLogging(stack, options); err != nil { return err } return nil } func newServiceMetadataMiddleware_opUpdateRegexMatchSet(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "waf", OperationName: "UpdateRegexMatchSet", } }
170
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package waf import ( "context" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/waf/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // This is AWS WAF Classic documentation. For more information, see AWS WAF Classic (https://docs.aws.amazon.com/waf/latest/developerguide/classic-waf-chapter.html) // in the developer guide. For the latest version of AWS WAF, use the AWS WAFV2 API // and see the AWS WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html) // . With the latest version, AWS WAF has a single set of endpoints for regional // and global use. Inserts or deletes RegexPatternString objects in a // RegexPatternSet . For each RegexPatternString object, you specify the following // values: // - Whether to insert or delete the RegexPatternString . // - The regular expression pattern that you want to insert or delete. For more // information, see RegexPatternSet . // // For example, you can create a RegexPatternString such as B[a@]dB[o0]t . AWS WAF // will match this RegexPatternString to: // - BadBot // - BadB0t // - B@dBot // - B@dB0t // // To create and configure a RegexPatternSet , perform the following steps: // - Create a RegexPatternSet. For more information, see CreateRegexPatternSet . // - Use GetChangeToken to get the change token that you provide in the // ChangeToken parameter of an UpdateRegexPatternSet request. // - Submit an UpdateRegexPatternSet request to specify the regular expression // pattern that you want AWS WAF to watch for. // // For more information about how to use the AWS WAF API to allow or block HTTP // requests, see the AWS WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/) // . func (c *Client) UpdateRegexPatternSet(ctx context.Context, params *UpdateRegexPatternSetInput, optFns ...func(*Options)) (*UpdateRegexPatternSetOutput, error) { if params == nil { params = &UpdateRegexPatternSetInput{} } result, metadata, err := c.invokeOperation(ctx, "UpdateRegexPatternSet", params, optFns, c.addOperationUpdateRegexPatternSetMiddlewares) if err != nil { return nil, err } out := result.(*UpdateRegexPatternSetOutput) out.ResultMetadata = metadata return out, nil } type UpdateRegexPatternSetInput struct { // The value returned by the most recent call to GetChangeToken . // // This member is required. ChangeToken *string // The RegexPatternSetId of the RegexPatternSet that you want to update. // RegexPatternSetId is returned by CreateRegexPatternSet and by // ListRegexPatternSets . // // This member is required. RegexPatternSetId *string // An array of RegexPatternSetUpdate objects that you want to insert into or // delete from a RegexPatternSet . // // This member is required. Updates []types.RegexPatternSetUpdate noSmithyDocumentSerde } type UpdateRegexPatternSetOutput struct { // The ChangeToken that you used to submit the UpdateRegexPatternSet request. You // can also use this value to query the status of the request. For more // information, see GetChangeTokenStatus . ChangeToken *string // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationUpdateRegexPatternSetMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson11_serializeOpUpdateRegexPatternSet{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpUpdateRegexPatternSet{}, middleware.After) if err != nil { return err } if err = addSetLoggerMiddleware(stack, options); err != nil { return err } if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { return err } if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { return err } if err = addRetryMiddlewares(stack, options); err != nil { return err } if err = addHTTPSignerV4Middleware(stack, options); err != nil { return err } if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { return err } if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack); err != nil { return err } if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { return err } if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } if err = addOpUpdateRegexPatternSetValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateRegexPatternSet(options.Region), middleware.Before); err != nil { return err } if err = awsmiddleware.AddRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { return err } if err = addResponseErrorMiddleware(stack); err != nil { return err } if err = addRequestResponseLogging(stack, options); err != nil { return err } return nil } func newServiceMetadataMiddleware_opUpdateRegexPatternSet(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "waf", OperationName: "UpdateRegexPatternSet", } }
167
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package waf import ( "context" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/waf/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // This is AWS WAF Classic documentation. For more information, see AWS WAF Classic (https://docs.aws.amazon.com/waf/latest/developerguide/classic-waf-chapter.html) // in the developer guide. For the latest version of AWS WAF, use the AWS WAFV2 API // and see the AWS WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html) // . With the latest version, AWS WAF has a single set of endpoints for regional // and global use. Inserts or deletes Predicate objects in a Rule . Each Predicate // object identifies a predicate, such as a ByteMatchSet or an IPSet , that // specifies the web requests that you want to allow, block, or count. If you add // more than one predicate to a Rule , a request must match all of the // specifications to be allowed, blocked, or counted. For example, suppose that you // add the following to a Rule : // - A ByteMatchSet that matches the value BadBot in the User-Agent header // - An IPSet that matches the IP address 192.0.2.44 // // You then add the Rule to a WebACL and specify that you want to block requests // that satisfy the Rule . For a request to be blocked, the User-Agent header in // the request must contain the value BadBot and the request must originate from // the IP address 192.0.2.44. To create and configure a Rule , perform the // following steps: // - Create and update the predicates that you want to include in the Rule . // - Create the Rule . See CreateRule . // - Use GetChangeToken to get the change token that you provide in the // ChangeToken parameter of an UpdateRule request. // - Submit an UpdateRule request to add predicates to the Rule . // - Create and update a WebACL that contains the Rule . See CreateWebACL . // // If you want to replace one ByteMatchSet or IPSet with another, you delete the // existing one and add the new one. For more information about how to use the AWS // WAF API to allow or block HTTP requests, see the AWS WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/) // . func (c *Client) UpdateRule(ctx context.Context, params *UpdateRuleInput, optFns ...func(*Options)) (*UpdateRuleOutput, error) { if params == nil { params = &UpdateRuleInput{} } result, metadata, err := c.invokeOperation(ctx, "UpdateRule", params, optFns, c.addOperationUpdateRuleMiddlewares) if err != nil { return nil, err } out := result.(*UpdateRuleOutput) out.ResultMetadata = metadata return out, nil } type UpdateRuleInput struct { // The value returned by the most recent call to GetChangeToken . // // This member is required. ChangeToken *string // The RuleId of the Rule that you want to update. RuleId is returned by CreateRule // and by ListRules . // // This member is required. RuleId *string // An array of RuleUpdate objects that you want to insert into or delete from a // Rule . For more information, see the applicable data types: // - RuleUpdate : Contains Action and Predicate // - Predicate : Contains DataId , Negated , and Type // - FieldToMatch : Contains Data and Type // // This member is required. Updates []types.RuleUpdate noSmithyDocumentSerde } type UpdateRuleOutput struct { // The ChangeToken that you used to submit the UpdateRule request. You can also // use this value to query the status of the request. For more information, see // GetChangeTokenStatus . ChangeToken *string // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationUpdateRuleMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson11_serializeOpUpdateRule{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpUpdateRule{}, middleware.After) if err != nil { return err } if err = addSetLoggerMiddleware(stack, options); err != nil { return err } if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { return err } if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { return err } if err = addRetryMiddlewares(stack, options); err != nil { return err } if err = addHTTPSignerV4Middleware(stack, options); err != nil { return err } if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { return err } if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack); err != nil { return err } if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { return err } if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } if err = addOpUpdateRuleValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateRule(options.Region), middleware.Before); err != nil { return err } if err = awsmiddleware.AddRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { return err } if err = addResponseErrorMiddleware(stack); err != nil { return err } if err = addRequestResponseLogging(stack, options); err != nil { return err } return nil } func newServiceMetadataMiddleware_opUpdateRule(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "waf", OperationName: "UpdateRule", } }
170
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package waf import ( "context" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/waf/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // This is AWS WAF Classic documentation. For more information, see AWS WAF Classic (https://docs.aws.amazon.com/waf/latest/developerguide/classic-waf-chapter.html) // in the developer guide. For the latest version of AWS WAF, use the AWS WAFV2 API // and see the AWS WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html) // . With the latest version, AWS WAF has a single set of endpoints for regional // and global use. Inserts or deletes ActivatedRule objects in a RuleGroup . You // can only insert REGULAR rules into a rule group. You can have a maximum of ten // rules per rule group. To create and configure a RuleGroup , perform the // following steps: // - Create and update the Rules that you want to include in the RuleGroup . See // CreateRule . // - Use GetChangeToken to get the change token that you provide in the // ChangeToken parameter of an UpdateRuleGroup request. // - Submit an UpdateRuleGroup request to add Rules to the RuleGroup . // - Create and update a WebACL that contains the RuleGroup . See CreateWebACL . // // If you want to replace one Rule with another, you delete the existing one and // add the new one. For more information about how to use the AWS WAF API to allow // or block HTTP requests, see the AWS WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/) // . func (c *Client) UpdateRuleGroup(ctx context.Context, params *UpdateRuleGroupInput, optFns ...func(*Options)) (*UpdateRuleGroupOutput, error) { if params == nil { params = &UpdateRuleGroupInput{} } result, metadata, err := c.invokeOperation(ctx, "UpdateRuleGroup", params, optFns, c.addOperationUpdateRuleGroupMiddlewares) if err != nil { return nil, err } out := result.(*UpdateRuleGroupOutput) out.ResultMetadata = metadata return out, nil } type UpdateRuleGroupInput struct { // The value returned by the most recent call to GetChangeToken . // // This member is required. ChangeToken *string // The RuleGroupId of the RuleGroup that you want to update. RuleGroupId is // returned by CreateRuleGroup and by ListRuleGroups . // // This member is required. RuleGroupId *string // An array of RuleGroupUpdate objects that you want to insert into or delete from // a RuleGroup . You can only insert REGULAR rules into a rule group. // ActivatedRule|OverrideAction applies only when updating or adding a RuleGroup // to a WebACL . In this case you do not use ActivatedRule|Action . For all other // update requests, ActivatedRule|Action is used instead of // ActivatedRule|OverrideAction . // // This member is required. Updates []types.RuleGroupUpdate noSmithyDocumentSerde } type UpdateRuleGroupOutput struct { // The ChangeToken that you used to submit the UpdateRuleGroup request. You can // also use this value to query the status of the request. For more information, // see GetChangeTokenStatus . ChangeToken *string // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationUpdateRuleGroupMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson11_serializeOpUpdateRuleGroup{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpUpdateRuleGroup{}, middleware.After) if err != nil { return err } if err = addSetLoggerMiddleware(stack, options); err != nil { return err } if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { return err } if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { return err } if err = addRetryMiddlewares(stack, options); err != nil { return err } if err = addHTTPSignerV4Middleware(stack, options); err != nil { return err } if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { return err } if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack); err != nil { return err } if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { return err } if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } if err = addOpUpdateRuleGroupValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateRuleGroup(options.Region), middleware.Before); err != nil { return err } if err = awsmiddleware.AddRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { return err } if err = addResponseErrorMiddleware(stack); err != nil { return err } if err = addRequestResponseLogging(stack, options); err != nil { return err } return nil } func newServiceMetadataMiddleware_opUpdateRuleGroup(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "waf", OperationName: "UpdateRuleGroup", } }
161
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package waf import ( "context" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/waf/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // This is AWS WAF Classic documentation. For more information, see AWS WAF Classic (https://docs.aws.amazon.com/waf/latest/developerguide/classic-waf-chapter.html) // in the developer guide. For the latest version of AWS WAF, use the AWS WAFV2 API // and see the AWS WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html) // . With the latest version, AWS WAF has a single set of endpoints for regional // and global use. Inserts or deletes SizeConstraint objects (filters) in a // SizeConstraintSet . For each SizeConstraint object, you specify the following // values: // - Whether to insert or delete the object from the array. If you want to // change a SizeConstraintSetUpdate object, you delete the existing object and // add a new one. // - The part of a web request that you want AWS WAF to evaluate, such as the // length of a query string or the length of the User-Agent header. // - Whether to perform any transformations on the request, such as converting // it to lowercase, before checking its length. Note that transformations of the // request body are not supported because the AWS resource forwards only the first // 8192 bytes of your request to AWS WAF. You can only specify a single type of // TextTransformation. // - A ComparisonOperator used for evaluating the selected part of the request // against the specified Size , such as equals, greater than, less than, and so // on. // - The length, in bytes, that you want AWS WAF to watch for in selected part // of the request. The length is computed after applying the transformation. // // For example, you can add a SizeConstraintSetUpdate object that matches web // requests in which the length of the User-Agent header is greater than 100 // bytes. You can then configure AWS WAF to block those requests. To create and // configure a SizeConstraintSet , perform the following steps: // - Create a SizeConstraintSet. For more information, see // CreateSizeConstraintSet . // - Use GetChangeToken to get the change token that you provide in the // ChangeToken parameter of an UpdateSizeConstraintSet request. // - Submit an UpdateSizeConstraintSet request to specify the part of the request // that you want AWS WAF to inspect (for example, the header or the URI) and the // value that you want AWS WAF to watch for. // // For more information about how to use the AWS WAF API to allow or block HTTP // requests, see the AWS WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/) // . func (c *Client) UpdateSizeConstraintSet(ctx context.Context, params *UpdateSizeConstraintSetInput, optFns ...func(*Options)) (*UpdateSizeConstraintSetOutput, error) { if params == nil { params = &UpdateSizeConstraintSetInput{} } result, metadata, err := c.invokeOperation(ctx, "UpdateSizeConstraintSet", params, optFns, c.addOperationUpdateSizeConstraintSetMiddlewares) if err != nil { return nil, err } out := result.(*UpdateSizeConstraintSetOutput) out.ResultMetadata = metadata return out, nil } type UpdateSizeConstraintSetInput struct { // The value returned by the most recent call to GetChangeToken . // // This member is required. ChangeToken *string // The SizeConstraintSetId of the SizeConstraintSet that you want to update. // SizeConstraintSetId is returned by CreateSizeConstraintSet and by // ListSizeConstraintSets . // // This member is required. SizeConstraintSetId *string // An array of SizeConstraintSetUpdate objects that you want to insert into or // delete from a SizeConstraintSet . For more information, see the applicable data // types: // - SizeConstraintSetUpdate : Contains Action and SizeConstraint // - SizeConstraint : Contains FieldToMatch , TextTransformation , // ComparisonOperator , and Size // - FieldToMatch : Contains Data and Type // // This member is required. Updates []types.SizeConstraintSetUpdate noSmithyDocumentSerde } type UpdateSizeConstraintSetOutput struct { // The ChangeToken that you used to submit the UpdateSizeConstraintSet request. // You can also use this value to query the status of the request. For more // information, see GetChangeTokenStatus . ChangeToken *string // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationUpdateSizeConstraintSetMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson11_serializeOpUpdateSizeConstraintSet{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpUpdateSizeConstraintSet{}, middleware.After) if err != nil { return err } if err = addSetLoggerMiddleware(stack, options); err != nil { return err } if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { return err } if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { return err } if err = addRetryMiddlewares(stack, options); err != nil { return err } if err = addHTTPSignerV4Middleware(stack, options); err != nil { return err } if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { return err } if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack); err != nil { return err } if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { return err } if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } if err = addOpUpdateSizeConstraintSetValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateSizeConstraintSet(options.Region), middleware.Before); err != nil { return err } if err = awsmiddleware.AddRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { return err } if err = addResponseErrorMiddleware(stack); err != nil { return err } if err = addRequestResponseLogging(stack, options); err != nil { return err } return nil } func newServiceMetadataMiddleware_opUpdateSizeConstraintSet(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "waf", OperationName: "UpdateSizeConstraintSet", } }
182
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package waf import ( "context" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/waf/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // This is AWS WAF Classic documentation. For more information, see AWS WAF Classic (https://docs.aws.amazon.com/waf/latest/developerguide/classic-waf-chapter.html) // in the developer guide. For the latest version of AWS WAF, use the AWS WAFV2 API // and see the AWS WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html) // . With the latest version, AWS WAF has a single set of endpoints for regional // and global use. Inserts or deletes SqlInjectionMatchTuple objects (filters) in // a SqlInjectionMatchSet . For each SqlInjectionMatchTuple object, you specify // the following values: // - Action : Whether to insert the object into or delete the object from the // array. To change a SqlInjectionMatchTuple , you delete the existing object and // add a new one. // - FieldToMatch : The part of web requests that you want AWS WAF to inspect // and, if you want AWS WAF to inspect a header or custom query parameter, the name // of the header or parameter. // - TextTransformation : Which text transformation, if any, to perform on the // web request before inspecting the request for snippets of malicious SQL code. // You can only specify a single type of TextTransformation. // // You use SqlInjectionMatchSet objects to specify which CloudFront requests that // you want to allow, block, or count. For example, if you're receiving requests // that contain snippets of SQL code in the query string and you want to block the // requests, you can create a SqlInjectionMatchSet with the applicable settings, // and then configure AWS WAF to block the requests. To create and configure a // SqlInjectionMatchSet , perform the following steps: // - Submit a CreateSqlInjectionMatchSet request. // - Use GetChangeToken to get the change token that you provide in the // ChangeToken parameter of an UpdateIPSet request. // - Submit an UpdateSqlInjectionMatchSet request to specify the parts of web // requests that you want AWS WAF to inspect for snippets of SQL code. // // For more information about how to use the AWS WAF API to allow or block HTTP // requests, see the AWS WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/) // . func (c *Client) UpdateSqlInjectionMatchSet(ctx context.Context, params *UpdateSqlInjectionMatchSetInput, optFns ...func(*Options)) (*UpdateSqlInjectionMatchSetOutput, error) { if params == nil { params = &UpdateSqlInjectionMatchSetInput{} } result, metadata, err := c.invokeOperation(ctx, "UpdateSqlInjectionMatchSet", params, optFns, c.addOperationUpdateSqlInjectionMatchSetMiddlewares) if err != nil { return nil, err } out := result.(*UpdateSqlInjectionMatchSetOutput) out.ResultMetadata = metadata return out, nil } // A request to update a SqlInjectionMatchSet . type UpdateSqlInjectionMatchSetInput struct { // The value returned by the most recent call to GetChangeToken . // // This member is required. ChangeToken *string // The SqlInjectionMatchSetId of the SqlInjectionMatchSet that you want to update. // SqlInjectionMatchSetId is returned by CreateSqlInjectionMatchSet and by // ListSqlInjectionMatchSets . // // This member is required. SqlInjectionMatchSetId *string // An array of SqlInjectionMatchSetUpdate objects that you want to insert into or // delete from a SqlInjectionMatchSet . For more information, see the applicable // data types: // - SqlInjectionMatchSetUpdate : Contains Action and SqlInjectionMatchTuple // - SqlInjectionMatchTuple : Contains FieldToMatch and TextTransformation // - FieldToMatch : Contains Data and Type // // This member is required. Updates []types.SqlInjectionMatchSetUpdate noSmithyDocumentSerde } // The response to an UpdateSqlInjectionMatchSets request. type UpdateSqlInjectionMatchSetOutput struct { // The ChangeToken that you used to submit the UpdateSqlInjectionMatchSet request. // You can also use this value to query the status of the request. For more // information, see GetChangeTokenStatus . ChangeToken *string // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationUpdateSqlInjectionMatchSetMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson11_serializeOpUpdateSqlInjectionMatchSet{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpUpdateSqlInjectionMatchSet{}, middleware.After) if err != nil { return err } if err = addSetLoggerMiddleware(stack, options); err != nil { return err } if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { return err } if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { return err } if err = addRetryMiddlewares(stack, options); err != nil { return err } if err = addHTTPSignerV4Middleware(stack, options); err != nil { return err } if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { return err } if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack); err != nil { return err } if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { return err } if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } if err = addOpUpdateSqlInjectionMatchSetValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateSqlInjectionMatchSet(options.Region), middleware.Before); err != nil { return err } if err = awsmiddleware.AddRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { return err } if err = addResponseErrorMiddleware(stack); err != nil { return err } if err = addRequestResponseLogging(stack, options); err != nil { return err } return nil } func newServiceMetadataMiddleware_opUpdateSqlInjectionMatchSet(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "waf", OperationName: "UpdateSqlInjectionMatchSet", } }
177
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package waf import ( "context" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/waf/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // This is AWS WAF Classic documentation. For more information, see AWS WAF Classic (https://docs.aws.amazon.com/waf/latest/developerguide/classic-waf-chapter.html) // in the developer guide. For the latest version of AWS WAF, use the AWS WAFV2 API // and see the AWS WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html) // . With the latest version, AWS WAF has a single set of endpoints for regional // and global use. Inserts or deletes ActivatedRule objects in a WebACL . Each Rule // identifies web requests that you want to allow, block, or count. When you update // a WebACL , you specify the following values: // - A default action for the WebACL , either ALLOW or BLOCK . AWS WAF performs // the default action if a request doesn't match the criteria in any of the Rules // in a WebACL . // - The Rules that you want to add or delete. If you want to replace one Rule // with another, you delete the existing Rule and add the new one. // - For each Rule , whether you want AWS WAF to allow requests, block requests, // or count requests that match the conditions in the Rule . // - The order in which you want AWS WAF to evaluate the Rules in a WebACL . If // you add more than one Rule to a WebACL , AWS WAF evaluates each request // against the Rules in order based on the value of Priority . (The Rule that has // the lowest value for Priority is evaluated first.) When a web request matches // all the predicates (such as ByteMatchSets and IPSets ) in a Rule , AWS WAF // immediately takes the corresponding action, allow or block, and doesn't evaluate // the request against the remaining Rules in the WebACL , if any. // // To create and configure a WebACL , perform the following steps: // - Create and update the predicates that you want to include in Rules . For // more information, see CreateByteMatchSet , UpdateByteMatchSet , CreateIPSet , // UpdateIPSet , CreateSqlInjectionMatchSet , and UpdateSqlInjectionMatchSet . // - Create and update the Rules that you want to include in the WebACL . For // more information, see CreateRule and UpdateRule . // - Create a WebACL . See CreateWebACL . // - Use GetChangeToken to get the change token that you provide in the // ChangeToken parameter of an UpdateWebACL request. // - Submit an UpdateWebACL request to specify the Rules that you want to include // in the WebACL , to specify the default action, and to associate the WebACL // with a CloudFront distribution. The ActivatedRule can be a rule group. If you // specify a rule group as your ActivatedRule , you can exclude specific rules // from that rule group. If you already have a rule group associated with a web ACL // and want to submit an UpdateWebACL request to exclude certain rules from that // rule group, you must first remove the rule group from the web ACL, the re-insert // it again, specifying the excluded rules. For details, see // ActivatedRule$ExcludedRules . // // Be aware that if you try to add a RATE_BASED rule to a web ACL without setting // the rule type when first creating the rule, the UpdateWebACL request will fail // because the request tries to add a REGULAR rule (the default rule type) with the // specified ID, which does not exist. For more information about how to use the // AWS WAF API to allow or block HTTP requests, see the AWS WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/) // . func (c *Client) UpdateWebACL(ctx context.Context, params *UpdateWebACLInput, optFns ...func(*Options)) (*UpdateWebACLOutput, error) { if params == nil { params = &UpdateWebACLInput{} } result, metadata, err := c.invokeOperation(ctx, "UpdateWebACL", params, optFns, c.addOperationUpdateWebACLMiddlewares) if err != nil { return nil, err } out := result.(*UpdateWebACLOutput) out.ResultMetadata = metadata return out, nil } type UpdateWebACLInput struct { // The value returned by the most recent call to GetChangeToken . // // This member is required. ChangeToken *string // The WebACLId of the WebACL that you want to update. WebACLId is returned by // CreateWebACL and by ListWebACLs . // // This member is required. WebACLId *string // A default action for the web ACL, either ALLOW or BLOCK. AWS WAF performs the // default action if a request doesn't match the criteria in any of the rules in a // web ACL. DefaultAction *types.WafAction // An array of updates to make to the WebACL . An array of WebACLUpdate objects // that you want to insert into or delete from a WebACL . For more information, see // the applicable data types: // - WebACLUpdate : Contains Action and ActivatedRule // - ActivatedRule : Contains Action , OverrideAction , Priority , RuleId , and // Type . ActivatedRule|OverrideAction applies only when updating or adding a // RuleGroup to a WebACL . In this case, you do not use ActivatedRule|Action . // For all other update requests, ActivatedRule|Action is used instead of // ActivatedRule|OverrideAction . // - WafAction : Contains Type Updates []types.WebACLUpdate noSmithyDocumentSerde } type UpdateWebACLOutput struct { // The ChangeToken that you used to submit the UpdateWebACL request. You can also // use this value to query the status of the request. For more information, see // GetChangeTokenStatus . ChangeToken *string // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationUpdateWebACLMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson11_serializeOpUpdateWebACL{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpUpdateWebACL{}, middleware.After) if err != nil { return err } if err = addSetLoggerMiddleware(stack, options); err != nil { return err } if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { return err } if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { return err } if err = addRetryMiddlewares(stack, options); err != nil { return err } if err = addHTTPSignerV4Middleware(stack, options); err != nil { return err } if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { return err } if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack); err != nil { return err } if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { return err } if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } if err = addOpUpdateWebACLValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateWebACL(options.Region), middleware.Before); err != nil { return err } if err = awsmiddleware.AddRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { return err } if err = addResponseErrorMiddleware(stack); err != nil { return err } if err = addRequestResponseLogging(stack, options); err != nil { return err } return nil } func newServiceMetadataMiddleware_opUpdateWebACL(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "waf", OperationName: "UpdateWebACL", } }
196
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package waf import ( "context" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/waf/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // This is AWS WAF Classic documentation. For more information, see AWS WAF Classic (https://docs.aws.amazon.com/waf/latest/developerguide/classic-waf-chapter.html) // in the developer guide. For the latest version of AWS WAF, use the AWS WAFV2 API // and see the AWS WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html) // . With the latest version, AWS WAF has a single set of endpoints for regional // and global use. Inserts or deletes XssMatchTuple objects (filters) in an // XssMatchSet . For each XssMatchTuple object, you specify the following values: // - Action : Whether to insert the object into or delete the object from the // array. To change an XssMatchTuple , you delete the existing object and add a // new one. // - FieldToMatch : The part of web requests that you want AWS WAF to inspect // and, if you want AWS WAF to inspect a header or custom query parameter, the name // of the header or parameter. // - TextTransformation : Which text transformation, if any, to perform on the // web request before inspecting the request for cross-site scripting attacks. You // can only specify a single type of TextTransformation. // // You use XssMatchSet objects to specify which CloudFront requests that you want // to allow, block, or count. For example, if you're receiving requests that // contain cross-site scripting attacks in the request body and you want to block // the requests, you can create an XssMatchSet with the applicable settings, and // then configure AWS WAF to block the requests. To create and configure an // XssMatchSet , perform the following steps: // - Submit a CreateXssMatchSet request. // - Use GetChangeToken to get the change token that you provide in the // ChangeToken parameter of an UpdateIPSet request. // - Submit an UpdateXssMatchSet request to specify the parts of web requests // that you want AWS WAF to inspect for cross-site scripting attacks. // // For more information about how to use the AWS WAF API to allow or block HTTP // requests, see the AWS WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/) // . func (c *Client) UpdateXssMatchSet(ctx context.Context, params *UpdateXssMatchSetInput, optFns ...func(*Options)) (*UpdateXssMatchSetOutput, error) { if params == nil { params = &UpdateXssMatchSetInput{} } result, metadata, err := c.invokeOperation(ctx, "UpdateXssMatchSet", params, optFns, c.addOperationUpdateXssMatchSetMiddlewares) if err != nil { return nil, err } out := result.(*UpdateXssMatchSetOutput) out.ResultMetadata = metadata return out, nil } // A request to update an XssMatchSet . type UpdateXssMatchSetInput struct { // The value returned by the most recent call to GetChangeToken . // // This member is required. ChangeToken *string // An array of XssMatchSetUpdate objects that you want to insert into or delete // from an XssMatchSet . For more information, see the applicable data types: // - XssMatchSetUpdate : Contains Action and XssMatchTuple // - XssMatchTuple : Contains FieldToMatch and TextTransformation // - FieldToMatch : Contains Data and Type // // This member is required. Updates []types.XssMatchSetUpdate // The XssMatchSetId of the XssMatchSet that you want to update. XssMatchSetId is // returned by CreateXssMatchSet and by ListXssMatchSets . // // This member is required. XssMatchSetId *string noSmithyDocumentSerde } // The response to an UpdateXssMatchSets request. type UpdateXssMatchSetOutput struct { // The ChangeToken that you used to submit the UpdateXssMatchSet request. You can // also use this value to query the status of the request. For more information, // see GetChangeTokenStatus . ChangeToken *string // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationUpdateXssMatchSetMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson11_serializeOpUpdateXssMatchSet{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpUpdateXssMatchSet{}, middleware.After) if err != nil { return err } if err = addSetLoggerMiddleware(stack, options); err != nil { return err } if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { return err } if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { return err } if err = addRetryMiddlewares(stack, options); err != nil { return err } if err = addHTTPSignerV4Middleware(stack, options); err != nil { return err } if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { return err } if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack); err != nil { return err } if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { return err } if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } if err = addOpUpdateXssMatchSetValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateXssMatchSet(options.Region), middleware.Before); err != nil { return err } if err = awsmiddleware.AddRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { return err } if err = addResponseErrorMiddleware(stack); err != nil { return err } if err = addRequestResponseLogging(stack, options); err != nil { return err } return nil } func newServiceMetadataMiddleware_opUpdateXssMatchSet(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "waf", OperationName: "UpdateXssMatchSet", } }
174
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package waf import ( "bytes" "context" "encoding/base64" "encoding/json" "fmt" "github.com/aws/aws-sdk-go-v2/aws/protocol/restjson" "github.com/aws/aws-sdk-go-v2/service/waf/types" smithy "github.com/aws/smithy-go" smithyio "github.com/aws/smithy-go/io" "github.com/aws/smithy-go/middleware" "github.com/aws/smithy-go/ptr" smithytime "github.com/aws/smithy-go/time" smithyhttp "github.com/aws/smithy-go/transport/http" "io" "strings" ) type awsAwsjson11_deserializeOpCreateByteMatchSet struct { } func (*awsAwsjson11_deserializeOpCreateByteMatchSet) ID() string { return "OperationDeserializer" } func (m *awsAwsjson11_deserializeOpCreateByteMatchSet) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) if err != nil { return out, metadata, err } response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} } if response.StatusCode < 200 || response.StatusCode >= 300 { return out, metadata, awsAwsjson11_deserializeOpErrorCreateByteMatchSet(response, &metadata) } output := &CreateByteMatchSetOutput{} out.Result = output var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(response.Body, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } err = awsAwsjson11_deserializeOpDocumentCreateByteMatchSetOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } return out, metadata, err } func awsAwsjson11_deserializeOpErrorCreateByteMatchSet(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") if len(headerCode) != 0 { errorCode = restjson.SanitizeErrorCode(headerCode) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(headerCode) == 0 && len(jsonCode) != 0 { errorCode = restjson.SanitizeErrorCode(jsonCode) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("WAFDisallowedNameException", errorCode): return awsAwsjson11_deserializeErrorWAFDisallowedNameException(response, errorBody) case strings.EqualFold("WAFInternalErrorException", errorCode): return awsAwsjson11_deserializeErrorWAFInternalErrorException(response, errorBody) case strings.EqualFold("WAFInvalidAccountException", errorCode): return awsAwsjson11_deserializeErrorWAFInvalidAccountException(response, errorBody) case strings.EqualFold("WAFInvalidParameterException", errorCode): return awsAwsjson11_deserializeErrorWAFInvalidParameterException(response, errorBody) case strings.EqualFold("WAFLimitsExceededException", errorCode): return awsAwsjson11_deserializeErrorWAFLimitsExceededException(response, errorBody) case strings.EqualFold("WAFStaleDataException", errorCode): return awsAwsjson11_deserializeErrorWAFStaleDataException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson11_deserializeOpCreateGeoMatchSet struct { } func (*awsAwsjson11_deserializeOpCreateGeoMatchSet) ID() string { return "OperationDeserializer" } func (m *awsAwsjson11_deserializeOpCreateGeoMatchSet) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) if err != nil { return out, metadata, err } response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} } if response.StatusCode < 200 || response.StatusCode >= 300 { return out, metadata, awsAwsjson11_deserializeOpErrorCreateGeoMatchSet(response, &metadata) } output := &CreateGeoMatchSetOutput{} out.Result = output var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(response.Body, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } err = awsAwsjson11_deserializeOpDocumentCreateGeoMatchSetOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } return out, metadata, err } func awsAwsjson11_deserializeOpErrorCreateGeoMatchSet(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") if len(headerCode) != 0 { errorCode = restjson.SanitizeErrorCode(headerCode) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(headerCode) == 0 && len(jsonCode) != 0 { errorCode = restjson.SanitizeErrorCode(jsonCode) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("WAFDisallowedNameException", errorCode): return awsAwsjson11_deserializeErrorWAFDisallowedNameException(response, errorBody) case strings.EqualFold("WAFInternalErrorException", errorCode): return awsAwsjson11_deserializeErrorWAFInternalErrorException(response, errorBody) case strings.EqualFold("WAFInvalidAccountException", errorCode): return awsAwsjson11_deserializeErrorWAFInvalidAccountException(response, errorBody) case strings.EqualFold("WAFInvalidParameterException", errorCode): return awsAwsjson11_deserializeErrorWAFInvalidParameterException(response, errorBody) case strings.EqualFold("WAFLimitsExceededException", errorCode): return awsAwsjson11_deserializeErrorWAFLimitsExceededException(response, errorBody) case strings.EqualFold("WAFStaleDataException", errorCode): return awsAwsjson11_deserializeErrorWAFStaleDataException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson11_deserializeOpCreateIPSet struct { } func (*awsAwsjson11_deserializeOpCreateIPSet) ID() string { return "OperationDeserializer" } func (m *awsAwsjson11_deserializeOpCreateIPSet) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) if err != nil { return out, metadata, err } response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} } if response.StatusCode < 200 || response.StatusCode >= 300 { return out, metadata, awsAwsjson11_deserializeOpErrorCreateIPSet(response, &metadata) } output := &CreateIPSetOutput{} out.Result = output var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(response.Body, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } err = awsAwsjson11_deserializeOpDocumentCreateIPSetOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } return out, metadata, err } func awsAwsjson11_deserializeOpErrorCreateIPSet(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") if len(headerCode) != 0 { errorCode = restjson.SanitizeErrorCode(headerCode) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(headerCode) == 0 && len(jsonCode) != 0 { errorCode = restjson.SanitizeErrorCode(jsonCode) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("WAFDisallowedNameException", errorCode): return awsAwsjson11_deserializeErrorWAFDisallowedNameException(response, errorBody) case strings.EqualFold("WAFInternalErrorException", errorCode): return awsAwsjson11_deserializeErrorWAFInternalErrorException(response, errorBody) case strings.EqualFold("WAFInvalidAccountException", errorCode): return awsAwsjson11_deserializeErrorWAFInvalidAccountException(response, errorBody) case strings.EqualFold("WAFInvalidParameterException", errorCode): return awsAwsjson11_deserializeErrorWAFInvalidParameterException(response, errorBody) case strings.EqualFold("WAFLimitsExceededException", errorCode): return awsAwsjson11_deserializeErrorWAFLimitsExceededException(response, errorBody) case strings.EqualFold("WAFStaleDataException", errorCode): return awsAwsjson11_deserializeErrorWAFStaleDataException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson11_deserializeOpCreateRateBasedRule struct { } func (*awsAwsjson11_deserializeOpCreateRateBasedRule) ID() string { return "OperationDeserializer" } func (m *awsAwsjson11_deserializeOpCreateRateBasedRule) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) if err != nil { return out, metadata, err } response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} } if response.StatusCode < 200 || response.StatusCode >= 300 { return out, metadata, awsAwsjson11_deserializeOpErrorCreateRateBasedRule(response, &metadata) } output := &CreateRateBasedRuleOutput{} out.Result = output var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(response.Body, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } err = awsAwsjson11_deserializeOpDocumentCreateRateBasedRuleOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } return out, metadata, err } func awsAwsjson11_deserializeOpErrorCreateRateBasedRule(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") if len(headerCode) != 0 { errorCode = restjson.SanitizeErrorCode(headerCode) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(headerCode) == 0 && len(jsonCode) != 0 { errorCode = restjson.SanitizeErrorCode(jsonCode) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("WAFBadRequestException", errorCode): return awsAwsjson11_deserializeErrorWAFBadRequestException(response, errorBody) case strings.EqualFold("WAFDisallowedNameException", errorCode): return awsAwsjson11_deserializeErrorWAFDisallowedNameException(response, errorBody) case strings.EqualFold("WAFInternalErrorException", errorCode): return awsAwsjson11_deserializeErrorWAFInternalErrorException(response, errorBody) case strings.EqualFold("WAFInvalidParameterException", errorCode): return awsAwsjson11_deserializeErrorWAFInvalidParameterException(response, errorBody) case strings.EqualFold("WAFLimitsExceededException", errorCode): return awsAwsjson11_deserializeErrorWAFLimitsExceededException(response, errorBody) case strings.EqualFold("WAFStaleDataException", errorCode): return awsAwsjson11_deserializeErrorWAFStaleDataException(response, errorBody) case strings.EqualFold("WAFTagOperationException", errorCode): return awsAwsjson11_deserializeErrorWAFTagOperationException(response, errorBody) case strings.EqualFold("WAFTagOperationInternalErrorException", errorCode): return awsAwsjson11_deserializeErrorWAFTagOperationInternalErrorException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson11_deserializeOpCreateRegexMatchSet struct { } func (*awsAwsjson11_deserializeOpCreateRegexMatchSet) ID() string { return "OperationDeserializer" } func (m *awsAwsjson11_deserializeOpCreateRegexMatchSet) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) if err != nil { return out, metadata, err } response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} } if response.StatusCode < 200 || response.StatusCode >= 300 { return out, metadata, awsAwsjson11_deserializeOpErrorCreateRegexMatchSet(response, &metadata) } output := &CreateRegexMatchSetOutput{} out.Result = output var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(response.Body, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } err = awsAwsjson11_deserializeOpDocumentCreateRegexMatchSetOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } return out, metadata, err } func awsAwsjson11_deserializeOpErrorCreateRegexMatchSet(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") if len(headerCode) != 0 { errorCode = restjson.SanitizeErrorCode(headerCode) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(headerCode) == 0 && len(jsonCode) != 0 { errorCode = restjson.SanitizeErrorCode(jsonCode) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("WAFDisallowedNameException", errorCode): return awsAwsjson11_deserializeErrorWAFDisallowedNameException(response, errorBody) case strings.EqualFold("WAFInternalErrorException", errorCode): return awsAwsjson11_deserializeErrorWAFInternalErrorException(response, errorBody) case strings.EqualFold("WAFLimitsExceededException", errorCode): return awsAwsjson11_deserializeErrorWAFLimitsExceededException(response, errorBody) case strings.EqualFold("WAFStaleDataException", errorCode): return awsAwsjson11_deserializeErrorWAFStaleDataException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson11_deserializeOpCreateRegexPatternSet struct { } func (*awsAwsjson11_deserializeOpCreateRegexPatternSet) ID() string { return "OperationDeserializer" } func (m *awsAwsjson11_deserializeOpCreateRegexPatternSet) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) if err != nil { return out, metadata, err } response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} } if response.StatusCode < 200 || response.StatusCode >= 300 { return out, metadata, awsAwsjson11_deserializeOpErrorCreateRegexPatternSet(response, &metadata) } output := &CreateRegexPatternSetOutput{} out.Result = output var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(response.Body, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } err = awsAwsjson11_deserializeOpDocumentCreateRegexPatternSetOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } return out, metadata, err } func awsAwsjson11_deserializeOpErrorCreateRegexPatternSet(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") if len(headerCode) != 0 { errorCode = restjson.SanitizeErrorCode(headerCode) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(headerCode) == 0 && len(jsonCode) != 0 { errorCode = restjson.SanitizeErrorCode(jsonCode) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("WAFDisallowedNameException", errorCode): return awsAwsjson11_deserializeErrorWAFDisallowedNameException(response, errorBody) case strings.EqualFold("WAFInternalErrorException", errorCode): return awsAwsjson11_deserializeErrorWAFInternalErrorException(response, errorBody) case strings.EqualFold("WAFLimitsExceededException", errorCode): return awsAwsjson11_deserializeErrorWAFLimitsExceededException(response, errorBody) case strings.EqualFold("WAFStaleDataException", errorCode): return awsAwsjson11_deserializeErrorWAFStaleDataException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson11_deserializeOpCreateRule struct { } func (*awsAwsjson11_deserializeOpCreateRule) ID() string { return "OperationDeserializer" } func (m *awsAwsjson11_deserializeOpCreateRule) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) if err != nil { return out, metadata, err } response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} } if response.StatusCode < 200 || response.StatusCode >= 300 { return out, metadata, awsAwsjson11_deserializeOpErrorCreateRule(response, &metadata) } output := &CreateRuleOutput{} out.Result = output var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(response.Body, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } err = awsAwsjson11_deserializeOpDocumentCreateRuleOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } return out, metadata, err } func awsAwsjson11_deserializeOpErrorCreateRule(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") if len(headerCode) != 0 { errorCode = restjson.SanitizeErrorCode(headerCode) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(headerCode) == 0 && len(jsonCode) != 0 { errorCode = restjson.SanitizeErrorCode(jsonCode) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("WAFBadRequestException", errorCode): return awsAwsjson11_deserializeErrorWAFBadRequestException(response, errorBody) case strings.EqualFold("WAFDisallowedNameException", errorCode): return awsAwsjson11_deserializeErrorWAFDisallowedNameException(response, errorBody) case strings.EqualFold("WAFInternalErrorException", errorCode): return awsAwsjson11_deserializeErrorWAFInternalErrorException(response, errorBody) case strings.EqualFold("WAFInvalidParameterException", errorCode): return awsAwsjson11_deserializeErrorWAFInvalidParameterException(response, errorBody) case strings.EqualFold("WAFLimitsExceededException", errorCode): return awsAwsjson11_deserializeErrorWAFLimitsExceededException(response, errorBody) case strings.EqualFold("WAFStaleDataException", errorCode): return awsAwsjson11_deserializeErrorWAFStaleDataException(response, errorBody) case strings.EqualFold("WAFTagOperationException", errorCode): return awsAwsjson11_deserializeErrorWAFTagOperationException(response, errorBody) case strings.EqualFold("WAFTagOperationInternalErrorException", errorCode): return awsAwsjson11_deserializeErrorWAFTagOperationInternalErrorException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson11_deserializeOpCreateRuleGroup struct { } func (*awsAwsjson11_deserializeOpCreateRuleGroup) ID() string { return "OperationDeserializer" } func (m *awsAwsjson11_deserializeOpCreateRuleGroup) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) if err != nil { return out, metadata, err } response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} } if response.StatusCode < 200 || response.StatusCode >= 300 { return out, metadata, awsAwsjson11_deserializeOpErrorCreateRuleGroup(response, &metadata) } output := &CreateRuleGroupOutput{} out.Result = output var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(response.Body, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } err = awsAwsjson11_deserializeOpDocumentCreateRuleGroupOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } return out, metadata, err } func awsAwsjson11_deserializeOpErrorCreateRuleGroup(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") if len(headerCode) != 0 { errorCode = restjson.SanitizeErrorCode(headerCode) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(headerCode) == 0 && len(jsonCode) != 0 { errorCode = restjson.SanitizeErrorCode(jsonCode) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("WAFBadRequestException", errorCode): return awsAwsjson11_deserializeErrorWAFBadRequestException(response, errorBody) case strings.EqualFold("WAFDisallowedNameException", errorCode): return awsAwsjson11_deserializeErrorWAFDisallowedNameException(response, errorBody) case strings.EqualFold("WAFInternalErrorException", errorCode): return awsAwsjson11_deserializeErrorWAFInternalErrorException(response, errorBody) case strings.EqualFold("WAFLimitsExceededException", errorCode): return awsAwsjson11_deserializeErrorWAFLimitsExceededException(response, errorBody) case strings.EqualFold("WAFStaleDataException", errorCode): return awsAwsjson11_deserializeErrorWAFStaleDataException(response, errorBody) case strings.EqualFold("WAFTagOperationException", errorCode): return awsAwsjson11_deserializeErrorWAFTagOperationException(response, errorBody) case strings.EqualFold("WAFTagOperationInternalErrorException", errorCode): return awsAwsjson11_deserializeErrorWAFTagOperationInternalErrorException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson11_deserializeOpCreateSizeConstraintSet struct { } func (*awsAwsjson11_deserializeOpCreateSizeConstraintSet) ID() string { return "OperationDeserializer" } func (m *awsAwsjson11_deserializeOpCreateSizeConstraintSet) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) if err != nil { return out, metadata, err } response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} } if response.StatusCode < 200 || response.StatusCode >= 300 { return out, metadata, awsAwsjson11_deserializeOpErrorCreateSizeConstraintSet(response, &metadata) } output := &CreateSizeConstraintSetOutput{} out.Result = output var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(response.Body, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } err = awsAwsjson11_deserializeOpDocumentCreateSizeConstraintSetOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } return out, metadata, err } func awsAwsjson11_deserializeOpErrorCreateSizeConstraintSet(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") if len(headerCode) != 0 { errorCode = restjson.SanitizeErrorCode(headerCode) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(headerCode) == 0 && len(jsonCode) != 0 { errorCode = restjson.SanitizeErrorCode(jsonCode) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("WAFDisallowedNameException", errorCode): return awsAwsjson11_deserializeErrorWAFDisallowedNameException(response, errorBody) case strings.EqualFold("WAFInternalErrorException", errorCode): return awsAwsjson11_deserializeErrorWAFInternalErrorException(response, errorBody) case strings.EqualFold("WAFInvalidAccountException", errorCode): return awsAwsjson11_deserializeErrorWAFInvalidAccountException(response, errorBody) case strings.EqualFold("WAFInvalidParameterException", errorCode): return awsAwsjson11_deserializeErrorWAFInvalidParameterException(response, errorBody) case strings.EqualFold("WAFLimitsExceededException", errorCode): return awsAwsjson11_deserializeErrorWAFLimitsExceededException(response, errorBody) case strings.EqualFold("WAFStaleDataException", errorCode): return awsAwsjson11_deserializeErrorWAFStaleDataException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson11_deserializeOpCreateSqlInjectionMatchSet struct { } func (*awsAwsjson11_deserializeOpCreateSqlInjectionMatchSet) ID() string { return "OperationDeserializer" } func (m *awsAwsjson11_deserializeOpCreateSqlInjectionMatchSet) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) if err != nil { return out, metadata, err } response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} } if response.StatusCode < 200 || response.StatusCode >= 300 { return out, metadata, awsAwsjson11_deserializeOpErrorCreateSqlInjectionMatchSet(response, &metadata) } output := &CreateSqlInjectionMatchSetOutput{} out.Result = output var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(response.Body, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } err = awsAwsjson11_deserializeOpDocumentCreateSqlInjectionMatchSetOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } return out, metadata, err } func awsAwsjson11_deserializeOpErrorCreateSqlInjectionMatchSet(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") if len(headerCode) != 0 { errorCode = restjson.SanitizeErrorCode(headerCode) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(headerCode) == 0 && len(jsonCode) != 0 { errorCode = restjson.SanitizeErrorCode(jsonCode) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("WAFDisallowedNameException", errorCode): return awsAwsjson11_deserializeErrorWAFDisallowedNameException(response, errorBody) case strings.EqualFold("WAFInternalErrorException", errorCode): return awsAwsjson11_deserializeErrorWAFInternalErrorException(response, errorBody) case strings.EqualFold("WAFInvalidAccountException", errorCode): return awsAwsjson11_deserializeErrorWAFInvalidAccountException(response, errorBody) case strings.EqualFold("WAFInvalidParameterException", errorCode): return awsAwsjson11_deserializeErrorWAFInvalidParameterException(response, errorBody) case strings.EqualFold("WAFLimitsExceededException", errorCode): return awsAwsjson11_deserializeErrorWAFLimitsExceededException(response, errorBody) case strings.EqualFold("WAFStaleDataException", errorCode): return awsAwsjson11_deserializeErrorWAFStaleDataException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson11_deserializeOpCreateWebACL struct { } func (*awsAwsjson11_deserializeOpCreateWebACL) ID() string { return "OperationDeserializer" } func (m *awsAwsjson11_deserializeOpCreateWebACL) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) if err != nil { return out, metadata, err } response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} } if response.StatusCode < 200 || response.StatusCode >= 300 { return out, metadata, awsAwsjson11_deserializeOpErrorCreateWebACL(response, &metadata) } output := &CreateWebACLOutput{} out.Result = output var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(response.Body, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } err = awsAwsjson11_deserializeOpDocumentCreateWebACLOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } return out, metadata, err } func awsAwsjson11_deserializeOpErrorCreateWebACL(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") if len(headerCode) != 0 { errorCode = restjson.SanitizeErrorCode(headerCode) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(headerCode) == 0 && len(jsonCode) != 0 { errorCode = restjson.SanitizeErrorCode(jsonCode) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("WAFBadRequestException", errorCode): return awsAwsjson11_deserializeErrorWAFBadRequestException(response, errorBody) case strings.EqualFold("WAFDisallowedNameException", errorCode): return awsAwsjson11_deserializeErrorWAFDisallowedNameException(response, errorBody) case strings.EqualFold("WAFInternalErrorException", errorCode): return awsAwsjson11_deserializeErrorWAFInternalErrorException(response, errorBody) case strings.EqualFold("WAFInvalidAccountException", errorCode): return awsAwsjson11_deserializeErrorWAFInvalidAccountException(response, errorBody) case strings.EqualFold("WAFInvalidParameterException", errorCode): return awsAwsjson11_deserializeErrorWAFInvalidParameterException(response, errorBody) case strings.EqualFold("WAFLimitsExceededException", errorCode): return awsAwsjson11_deserializeErrorWAFLimitsExceededException(response, errorBody) case strings.EqualFold("WAFStaleDataException", errorCode): return awsAwsjson11_deserializeErrorWAFStaleDataException(response, errorBody) case strings.EqualFold("WAFTagOperationException", errorCode): return awsAwsjson11_deserializeErrorWAFTagOperationException(response, errorBody) case strings.EqualFold("WAFTagOperationInternalErrorException", errorCode): return awsAwsjson11_deserializeErrorWAFTagOperationInternalErrorException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson11_deserializeOpCreateWebACLMigrationStack struct { } func (*awsAwsjson11_deserializeOpCreateWebACLMigrationStack) ID() string { return "OperationDeserializer" } func (m *awsAwsjson11_deserializeOpCreateWebACLMigrationStack) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) if err != nil { return out, metadata, err } response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} } if response.StatusCode < 200 || response.StatusCode >= 300 { return out, metadata, awsAwsjson11_deserializeOpErrorCreateWebACLMigrationStack(response, &metadata) } output := &CreateWebACLMigrationStackOutput{} out.Result = output var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(response.Body, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } err = awsAwsjson11_deserializeOpDocumentCreateWebACLMigrationStackOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } return out, metadata, err } func awsAwsjson11_deserializeOpErrorCreateWebACLMigrationStack(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") if len(headerCode) != 0 { errorCode = restjson.SanitizeErrorCode(headerCode) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(headerCode) == 0 && len(jsonCode) != 0 { errorCode = restjson.SanitizeErrorCode(jsonCode) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("WAFEntityMigrationException", errorCode): return awsAwsjson11_deserializeErrorWAFEntityMigrationException(response, errorBody) case strings.EqualFold("WAFInternalErrorException", errorCode): return awsAwsjson11_deserializeErrorWAFInternalErrorException(response, errorBody) case strings.EqualFold("WAFInvalidOperationException", errorCode): return awsAwsjson11_deserializeErrorWAFInvalidOperationException(response, errorBody) case strings.EqualFold("WAFInvalidParameterException", errorCode): return awsAwsjson11_deserializeErrorWAFInvalidParameterException(response, errorBody) case strings.EqualFold("WAFNonexistentItemException", errorCode): return awsAwsjson11_deserializeErrorWAFNonexistentItemException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson11_deserializeOpCreateXssMatchSet struct { } func (*awsAwsjson11_deserializeOpCreateXssMatchSet) ID() string { return "OperationDeserializer" } func (m *awsAwsjson11_deserializeOpCreateXssMatchSet) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) if err != nil { return out, metadata, err } response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} } if response.StatusCode < 200 || response.StatusCode >= 300 { return out, metadata, awsAwsjson11_deserializeOpErrorCreateXssMatchSet(response, &metadata) } output := &CreateXssMatchSetOutput{} out.Result = output var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(response.Body, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } err = awsAwsjson11_deserializeOpDocumentCreateXssMatchSetOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } return out, metadata, err } func awsAwsjson11_deserializeOpErrorCreateXssMatchSet(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") if len(headerCode) != 0 { errorCode = restjson.SanitizeErrorCode(headerCode) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(headerCode) == 0 && len(jsonCode) != 0 { errorCode = restjson.SanitizeErrorCode(jsonCode) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("WAFDisallowedNameException", errorCode): return awsAwsjson11_deserializeErrorWAFDisallowedNameException(response, errorBody) case strings.EqualFold("WAFInternalErrorException", errorCode): return awsAwsjson11_deserializeErrorWAFInternalErrorException(response, errorBody) case strings.EqualFold("WAFInvalidAccountException", errorCode): return awsAwsjson11_deserializeErrorWAFInvalidAccountException(response, errorBody) case strings.EqualFold("WAFInvalidParameterException", errorCode): return awsAwsjson11_deserializeErrorWAFInvalidParameterException(response, errorBody) case strings.EqualFold("WAFLimitsExceededException", errorCode): return awsAwsjson11_deserializeErrorWAFLimitsExceededException(response, errorBody) case strings.EqualFold("WAFStaleDataException", errorCode): return awsAwsjson11_deserializeErrorWAFStaleDataException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson11_deserializeOpDeleteByteMatchSet struct { } func (*awsAwsjson11_deserializeOpDeleteByteMatchSet) ID() string { return "OperationDeserializer" } func (m *awsAwsjson11_deserializeOpDeleteByteMatchSet) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) if err != nil { return out, metadata, err } response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} } if response.StatusCode < 200 || response.StatusCode >= 300 { return out, metadata, awsAwsjson11_deserializeOpErrorDeleteByteMatchSet(response, &metadata) } output := &DeleteByteMatchSetOutput{} out.Result = output var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(response.Body, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } err = awsAwsjson11_deserializeOpDocumentDeleteByteMatchSetOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } return out, metadata, err } func awsAwsjson11_deserializeOpErrorDeleteByteMatchSet(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") if len(headerCode) != 0 { errorCode = restjson.SanitizeErrorCode(headerCode) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(headerCode) == 0 && len(jsonCode) != 0 { errorCode = restjson.SanitizeErrorCode(jsonCode) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("WAFInternalErrorException", errorCode): return awsAwsjson11_deserializeErrorWAFInternalErrorException(response, errorBody) case strings.EqualFold("WAFInvalidAccountException", errorCode): return awsAwsjson11_deserializeErrorWAFInvalidAccountException(response, errorBody) case strings.EqualFold("WAFNonEmptyEntityException", errorCode): return awsAwsjson11_deserializeErrorWAFNonEmptyEntityException(response, errorBody) case strings.EqualFold("WAFNonexistentItemException", errorCode): return awsAwsjson11_deserializeErrorWAFNonexistentItemException(response, errorBody) case strings.EqualFold("WAFReferencedItemException", errorCode): return awsAwsjson11_deserializeErrorWAFReferencedItemException(response, errorBody) case strings.EqualFold("WAFStaleDataException", errorCode): return awsAwsjson11_deserializeErrorWAFStaleDataException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson11_deserializeOpDeleteGeoMatchSet struct { } func (*awsAwsjson11_deserializeOpDeleteGeoMatchSet) ID() string { return "OperationDeserializer" } func (m *awsAwsjson11_deserializeOpDeleteGeoMatchSet) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) if err != nil { return out, metadata, err } response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} } if response.StatusCode < 200 || response.StatusCode >= 300 { return out, metadata, awsAwsjson11_deserializeOpErrorDeleteGeoMatchSet(response, &metadata) } output := &DeleteGeoMatchSetOutput{} out.Result = output var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(response.Body, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } err = awsAwsjson11_deserializeOpDocumentDeleteGeoMatchSetOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } return out, metadata, err } func awsAwsjson11_deserializeOpErrorDeleteGeoMatchSet(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") if len(headerCode) != 0 { errorCode = restjson.SanitizeErrorCode(headerCode) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(headerCode) == 0 && len(jsonCode) != 0 { errorCode = restjson.SanitizeErrorCode(jsonCode) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("WAFInternalErrorException", errorCode): return awsAwsjson11_deserializeErrorWAFInternalErrorException(response, errorBody) case strings.EqualFold("WAFInvalidAccountException", errorCode): return awsAwsjson11_deserializeErrorWAFInvalidAccountException(response, errorBody) case strings.EqualFold("WAFNonEmptyEntityException", errorCode): return awsAwsjson11_deserializeErrorWAFNonEmptyEntityException(response, errorBody) case strings.EqualFold("WAFNonexistentItemException", errorCode): return awsAwsjson11_deserializeErrorWAFNonexistentItemException(response, errorBody) case strings.EqualFold("WAFReferencedItemException", errorCode): return awsAwsjson11_deserializeErrorWAFReferencedItemException(response, errorBody) case strings.EqualFold("WAFStaleDataException", errorCode): return awsAwsjson11_deserializeErrorWAFStaleDataException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson11_deserializeOpDeleteIPSet struct { } func (*awsAwsjson11_deserializeOpDeleteIPSet) ID() string { return "OperationDeserializer" } func (m *awsAwsjson11_deserializeOpDeleteIPSet) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) if err != nil { return out, metadata, err } response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} } if response.StatusCode < 200 || response.StatusCode >= 300 { return out, metadata, awsAwsjson11_deserializeOpErrorDeleteIPSet(response, &metadata) } output := &DeleteIPSetOutput{} out.Result = output var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(response.Body, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } err = awsAwsjson11_deserializeOpDocumentDeleteIPSetOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } return out, metadata, err } func awsAwsjson11_deserializeOpErrorDeleteIPSet(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") if len(headerCode) != 0 { errorCode = restjson.SanitizeErrorCode(headerCode) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(headerCode) == 0 && len(jsonCode) != 0 { errorCode = restjson.SanitizeErrorCode(jsonCode) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("WAFInternalErrorException", errorCode): return awsAwsjson11_deserializeErrorWAFInternalErrorException(response, errorBody) case strings.EqualFold("WAFInvalidAccountException", errorCode): return awsAwsjson11_deserializeErrorWAFInvalidAccountException(response, errorBody) case strings.EqualFold("WAFNonEmptyEntityException", errorCode): return awsAwsjson11_deserializeErrorWAFNonEmptyEntityException(response, errorBody) case strings.EqualFold("WAFNonexistentItemException", errorCode): return awsAwsjson11_deserializeErrorWAFNonexistentItemException(response, errorBody) case strings.EqualFold("WAFReferencedItemException", errorCode): return awsAwsjson11_deserializeErrorWAFReferencedItemException(response, errorBody) case strings.EqualFold("WAFStaleDataException", errorCode): return awsAwsjson11_deserializeErrorWAFStaleDataException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson11_deserializeOpDeleteLoggingConfiguration struct { } func (*awsAwsjson11_deserializeOpDeleteLoggingConfiguration) ID() string { return "OperationDeserializer" } func (m *awsAwsjson11_deserializeOpDeleteLoggingConfiguration) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) if err != nil { return out, metadata, err } response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} } if response.StatusCode < 200 || response.StatusCode >= 300 { return out, metadata, awsAwsjson11_deserializeOpErrorDeleteLoggingConfiguration(response, &metadata) } output := &DeleteLoggingConfigurationOutput{} out.Result = output var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(response.Body, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } err = awsAwsjson11_deserializeOpDocumentDeleteLoggingConfigurationOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } return out, metadata, err } func awsAwsjson11_deserializeOpErrorDeleteLoggingConfiguration(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") if len(headerCode) != 0 { errorCode = restjson.SanitizeErrorCode(headerCode) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(headerCode) == 0 && len(jsonCode) != 0 { errorCode = restjson.SanitizeErrorCode(jsonCode) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("WAFInternalErrorException", errorCode): return awsAwsjson11_deserializeErrorWAFInternalErrorException(response, errorBody) case strings.EqualFold("WAFNonexistentItemException", errorCode): return awsAwsjson11_deserializeErrorWAFNonexistentItemException(response, errorBody) case strings.EqualFold("WAFStaleDataException", errorCode): return awsAwsjson11_deserializeErrorWAFStaleDataException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson11_deserializeOpDeletePermissionPolicy struct { } func (*awsAwsjson11_deserializeOpDeletePermissionPolicy) ID() string { return "OperationDeserializer" } func (m *awsAwsjson11_deserializeOpDeletePermissionPolicy) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) if err != nil { return out, metadata, err } response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} } if response.StatusCode < 200 || response.StatusCode >= 300 { return out, metadata, awsAwsjson11_deserializeOpErrorDeletePermissionPolicy(response, &metadata) } output := &DeletePermissionPolicyOutput{} out.Result = output var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(response.Body, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } err = awsAwsjson11_deserializeOpDocumentDeletePermissionPolicyOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } return out, metadata, err } func awsAwsjson11_deserializeOpErrorDeletePermissionPolicy(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") if len(headerCode) != 0 { errorCode = restjson.SanitizeErrorCode(headerCode) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(headerCode) == 0 && len(jsonCode) != 0 { errorCode = restjson.SanitizeErrorCode(jsonCode) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("WAFInternalErrorException", errorCode): return awsAwsjson11_deserializeErrorWAFInternalErrorException(response, errorBody) case strings.EqualFold("WAFNonexistentItemException", errorCode): return awsAwsjson11_deserializeErrorWAFNonexistentItemException(response, errorBody) case strings.EqualFold("WAFStaleDataException", errorCode): return awsAwsjson11_deserializeErrorWAFStaleDataException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson11_deserializeOpDeleteRateBasedRule struct { } func (*awsAwsjson11_deserializeOpDeleteRateBasedRule) ID() string { return "OperationDeserializer" } func (m *awsAwsjson11_deserializeOpDeleteRateBasedRule) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) if err != nil { return out, metadata, err } response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} } if response.StatusCode < 200 || response.StatusCode >= 300 { return out, metadata, awsAwsjson11_deserializeOpErrorDeleteRateBasedRule(response, &metadata) } output := &DeleteRateBasedRuleOutput{} out.Result = output var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(response.Body, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } err = awsAwsjson11_deserializeOpDocumentDeleteRateBasedRuleOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } return out, metadata, err } func awsAwsjson11_deserializeOpErrorDeleteRateBasedRule(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") if len(headerCode) != 0 { errorCode = restjson.SanitizeErrorCode(headerCode) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(headerCode) == 0 && len(jsonCode) != 0 { errorCode = restjson.SanitizeErrorCode(jsonCode) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("WAFInternalErrorException", errorCode): return awsAwsjson11_deserializeErrorWAFInternalErrorException(response, errorBody) case strings.EqualFold("WAFInvalidAccountException", errorCode): return awsAwsjson11_deserializeErrorWAFInvalidAccountException(response, errorBody) case strings.EqualFold("WAFNonEmptyEntityException", errorCode): return awsAwsjson11_deserializeErrorWAFNonEmptyEntityException(response, errorBody) case strings.EqualFold("WAFNonexistentItemException", errorCode): return awsAwsjson11_deserializeErrorWAFNonexistentItemException(response, errorBody) case strings.EqualFold("WAFReferencedItemException", errorCode): return awsAwsjson11_deserializeErrorWAFReferencedItemException(response, errorBody) case strings.EqualFold("WAFStaleDataException", errorCode): return awsAwsjson11_deserializeErrorWAFStaleDataException(response, errorBody) case strings.EqualFold("WAFTagOperationException", errorCode): return awsAwsjson11_deserializeErrorWAFTagOperationException(response, errorBody) case strings.EqualFold("WAFTagOperationInternalErrorException", errorCode): return awsAwsjson11_deserializeErrorWAFTagOperationInternalErrorException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson11_deserializeOpDeleteRegexMatchSet struct { } func (*awsAwsjson11_deserializeOpDeleteRegexMatchSet) ID() string { return "OperationDeserializer" } func (m *awsAwsjson11_deserializeOpDeleteRegexMatchSet) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) if err != nil { return out, metadata, err } response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} } if response.StatusCode < 200 || response.StatusCode >= 300 { return out, metadata, awsAwsjson11_deserializeOpErrorDeleteRegexMatchSet(response, &metadata) } output := &DeleteRegexMatchSetOutput{} out.Result = output var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(response.Body, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } err = awsAwsjson11_deserializeOpDocumentDeleteRegexMatchSetOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } return out, metadata, err } func awsAwsjson11_deserializeOpErrorDeleteRegexMatchSet(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") if len(headerCode) != 0 { errorCode = restjson.SanitizeErrorCode(headerCode) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(headerCode) == 0 && len(jsonCode) != 0 { errorCode = restjson.SanitizeErrorCode(jsonCode) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("WAFInternalErrorException", errorCode): return awsAwsjson11_deserializeErrorWAFInternalErrorException(response, errorBody) case strings.EqualFold("WAFInvalidAccountException", errorCode): return awsAwsjson11_deserializeErrorWAFInvalidAccountException(response, errorBody) case strings.EqualFold("WAFNonEmptyEntityException", errorCode): return awsAwsjson11_deserializeErrorWAFNonEmptyEntityException(response, errorBody) case strings.EqualFold("WAFNonexistentItemException", errorCode): return awsAwsjson11_deserializeErrorWAFNonexistentItemException(response, errorBody) case strings.EqualFold("WAFReferencedItemException", errorCode): return awsAwsjson11_deserializeErrorWAFReferencedItemException(response, errorBody) case strings.EqualFold("WAFStaleDataException", errorCode): return awsAwsjson11_deserializeErrorWAFStaleDataException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson11_deserializeOpDeleteRegexPatternSet struct { } func (*awsAwsjson11_deserializeOpDeleteRegexPatternSet) ID() string { return "OperationDeserializer" } func (m *awsAwsjson11_deserializeOpDeleteRegexPatternSet) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) if err != nil { return out, metadata, err } response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} } if response.StatusCode < 200 || response.StatusCode >= 300 { return out, metadata, awsAwsjson11_deserializeOpErrorDeleteRegexPatternSet(response, &metadata) } output := &DeleteRegexPatternSetOutput{} out.Result = output var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(response.Body, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } err = awsAwsjson11_deserializeOpDocumentDeleteRegexPatternSetOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } return out, metadata, err } func awsAwsjson11_deserializeOpErrorDeleteRegexPatternSet(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") if len(headerCode) != 0 { errorCode = restjson.SanitizeErrorCode(headerCode) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(headerCode) == 0 && len(jsonCode) != 0 { errorCode = restjson.SanitizeErrorCode(jsonCode) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("WAFInternalErrorException", errorCode): return awsAwsjson11_deserializeErrorWAFInternalErrorException(response, errorBody) case strings.EqualFold("WAFInvalidAccountException", errorCode): return awsAwsjson11_deserializeErrorWAFInvalidAccountException(response, errorBody) case strings.EqualFold("WAFNonEmptyEntityException", errorCode): return awsAwsjson11_deserializeErrorWAFNonEmptyEntityException(response, errorBody) case strings.EqualFold("WAFNonexistentItemException", errorCode): return awsAwsjson11_deserializeErrorWAFNonexistentItemException(response, errorBody) case strings.EqualFold("WAFReferencedItemException", errorCode): return awsAwsjson11_deserializeErrorWAFReferencedItemException(response, errorBody) case strings.EqualFold("WAFStaleDataException", errorCode): return awsAwsjson11_deserializeErrorWAFStaleDataException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson11_deserializeOpDeleteRule struct { } func (*awsAwsjson11_deserializeOpDeleteRule) ID() string { return "OperationDeserializer" } func (m *awsAwsjson11_deserializeOpDeleteRule) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) if err != nil { return out, metadata, err } response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} } if response.StatusCode < 200 || response.StatusCode >= 300 { return out, metadata, awsAwsjson11_deserializeOpErrorDeleteRule(response, &metadata) } output := &DeleteRuleOutput{} out.Result = output var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(response.Body, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } err = awsAwsjson11_deserializeOpDocumentDeleteRuleOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } return out, metadata, err } func awsAwsjson11_deserializeOpErrorDeleteRule(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") if len(headerCode) != 0 { errorCode = restjson.SanitizeErrorCode(headerCode) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(headerCode) == 0 && len(jsonCode) != 0 { errorCode = restjson.SanitizeErrorCode(jsonCode) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("WAFInternalErrorException", errorCode): return awsAwsjson11_deserializeErrorWAFInternalErrorException(response, errorBody) case strings.EqualFold("WAFInvalidAccountException", errorCode): return awsAwsjson11_deserializeErrorWAFInvalidAccountException(response, errorBody) case strings.EqualFold("WAFNonEmptyEntityException", errorCode): return awsAwsjson11_deserializeErrorWAFNonEmptyEntityException(response, errorBody) case strings.EqualFold("WAFNonexistentItemException", errorCode): return awsAwsjson11_deserializeErrorWAFNonexistentItemException(response, errorBody) case strings.EqualFold("WAFReferencedItemException", errorCode): return awsAwsjson11_deserializeErrorWAFReferencedItemException(response, errorBody) case strings.EqualFold("WAFStaleDataException", errorCode): return awsAwsjson11_deserializeErrorWAFStaleDataException(response, errorBody) case strings.EqualFold("WAFTagOperationException", errorCode): return awsAwsjson11_deserializeErrorWAFTagOperationException(response, errorBody) case strings.EqualFold("WAFTagOperationInternalErrorException", errorCode): return awsAwsjson11_deserializeErrorWAFTagOperationInternalErrorException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson11_deserializeOpDeleteRuleGroup struct { } func (*awsAwsjson11_deserializeOpDeleteRuleGroup) ID() string { return "OperationDeserializer" } func (m *awsAwsjson11_deserializeOpDeleteRuleGroup) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) if err != nil { return out, metadata, err } response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} } if response.StatusCode < 200 || response.StatusCode >= 300 { return out, metadata, awsAwsjson11_deserializeOpErrorDeleteRuleGroup(response, &metadata) } output := &DeleteRuleGroupOutput{} out.Result = output var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(response.Body, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } err = awsAwsjson11_deserializeOpDocumentDeleteRuleGroupOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } return out, metadata, err } func awsAwsjson11_deserializeOpErrorDeleteRuleGroup(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") if len(headerCode) != 0 { errorCode = restjson.SanitizeErrorCode(headerCode) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(headerCode) == 0 && len(jsonCode) != 0 { errorCode = restjson.SanitizeErrorCode(jsonCode) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("WAFInternalErrorException", errorCode): return awsAwsjson11_deserializeErrorWAFInternalErrorException(response, errorBody) case strings.EqualFold("WAFInvalidOperationException", errorCode): return awsAwsjson11_deserializeErrorWAFInvalidOperationException(response, errorBody) case strings.EqualFold("WAFNonEmptyEntityException", errorCode): return awsAwsjson11_deserializeErrorWAFNonEmptyEntityException(response, errorBody) case strings.EqualFold("WAFNonexistentItemException", errorCode): return awsAwsjson11_deserializeErrorWAFNonexistentItemException(response, errorBody) case strings.EqualFold("WAFReferencedItemException", errorCode): return awsAwsjson11_deserializeErrorWAFReferencedItemException(response, errorBody) case strings.EqualFold("WAFStaleDataException", errorCode): return awsAwsjson11_deserializeErrorWAFStaleDataException(response, errorBody) case strings.EqualFold("WAFTagOperationException", errorCode): return awsAwsjson11_deserializeErrorWAFTagOperationException(response, errorBody) case strings.EqualFold("WAFTagOperationInternalErrorException", errorCode): return awsAwsjson11_deserializeErrorWAFTagOperationInternalErrorException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson11_deserializeOpDeleteSizeConstraintSet struct { } func (*awsAwsjson11_deserializeOpDeleteSizeConstraintSet) ID() string { return "OperationDeserializer" } func (m *awsAwsjson11_deserializeOpDeleteSizeConstraintSet) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) if err != nil { return out, metadata, err } response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} } if response.StatusCode < 200 || response.StatusCode >= 300 { return out, metadata, awsAwsjson11_deserializeOpErrorDeleteSizeConstraintSet(response, &metadata) } output := &DeleteSizeConstraintSetOutput{} out.Result = output var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(response.Body, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } err = awsAwsjson11_deserializeOpDocumentDeleteSizeConstraintSetOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } return out, metadata, err } func awsAwsjson11_deserializeOpErrorDeleteSizeConstraintSet(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") if len(headerCode) != 0 { errorCode = restjson.SanitizeErrorCode(headerCode) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(headerCode) == 0 && len(jsonCode) != 0 { errorCode = restjson.SanitizeErrorCode(jsonCode) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("WAFInternalErrorException", errorCode): return awsAwsjson11_deserializeErrorWAFInternalErrorException(response, errorBody) case strings.EqualFold("WAFInvalidAccountException", errorCode): return awsAwsjson11_deserializeErrorWAFInvalidAccountException(response, errorBody) case strings.EqualFold("WAFNonEmptyEntityException", errorCode): return awsAwsjson11_deserializeErrorWAFNonEmptyEntityException(response, errorBody) case strings.EqualFold("WAFNonexistentItemException", errorCode): return awsAwsjson11_deserializeErrorWAFNonexistentItemException(response, errorBody) case strings.EqualFold("WAFReferencedItemException", errorCode): return awsAwsjson11_deserializeErrorWAFReferencedItemException(response, errorBody) case strings.EqualFold("WAFStaleDataException", errorCode): return awsAwsjson11_deserializeErrorWAFStaleDataException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson11_deserializeOpDeleteSqlInjectionMatchSet struct { } func (*awsAwsjson11_deserializeOpDeleteSqlInjectionMatchSet) ID() string { return "OperationDeserializer" } func (m *awsAwsjson11_deserializeOpDeleteSqlInjectionMatchSet) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) if err != nil { return out, metadata, err } response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} } if response.StatusCode < 200 || response.StatusCode >= 300 { return out, metadata, awsAwsjson11_deserializeOpErrorDeleteSqlInjectionMatchSet(response, &metadata) } output := &DeleteSqlInjectionMatchSetOutput{} out.Result = output var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(response.Body, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } err = awsAwsjson11_deserializeOpDocumentDeleteSqlInjectionMatchSetOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } return out, metadata, err } func awsAwsjson11_deserializeOpErrorDeleteSqlInjectionMatchSet(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") if len(headerCode) != 0 { errorCode = restjson.SanitizeErrorCode(headerCode) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(headerCode) == 0 && len(jsonCode) != 0 { errorCode = restjson.SanitizeErrorCode(jsonCode) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("WAFInternalErrorException", errorCode): return awsAwsjson11_deserializeErrorWAFInternalErrorException(response, errorBody) case strings.EqualFold("WAFInvalidAccountException", errorCode): return awsAwsjson11_deserializeErrorWAFInvalidAccountException(response, errorBody) case strings.EqualFold("WAFNonEmptyEntityException", errorCode): return awsAwsjson11_deserializeErrorWAFNonEmptyEntityException(response, errorBody) case strings.EqualFold("WAFNonexistentItemException", errorCode): return awsAwsjson11_deserializeErrorWAFNonexistentItemException(response, errorBody) case strings.EqualFold("WAFReferencedItemException", errorCode): return awsAwsjson11_deserializeErrorWAFReferencedItemException(response, errorBody) case strings.EqualFold("WAFStaleDataException", errorCode): return awsAwsjson11_deserializeErrorWAFStaleDataException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson11_deserializeOpDeleteWebACL struct { } func (*awsAwsjson11_deserializeOpDeleteWebACL) ID() string { return "OperationDeserializer" } func (m *awsAwsjson11_deserializeOpDeleteWebACL) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) if err != nil { return out, metadata, err } response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} } if response.StatusCode < 200 || response.StatusCode >= 300 { return out, metadata, awsAwsjson11_deserializeOpErrorDeleteWebACL(response, &metadata) } output := &DeleteWebACLOutput{} out.Result = output var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(response.Body, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } err = awsAwsjson11_deserializeOpDocumentDeleteWebACLOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } return out, metadata, err } func awsAwsjson11_deserializeOpErrorDeleteWebACL(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") if len(headerCode) != 0 { errorCode = restjson.SanitizeErrorCode(headerCode) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(headerCode) == 0 && len(jsonCode) != 0 { errorCode = restjson.SanitizeErrorCode(jsonCode) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("WAFInternalErrorException", errorCode): return awsAwsjson11_deserializeErrorWAFInternalErrorException(response, errorBody) case strings.EqualFold("WAFInvalidAccountException", errorCode): return awsAwsjson11_deserializeErrorWAFInvalidAccountException(response, errorBody) case strings.EqualFold("WAFNonEmptyEntityException", errorCode): return awsAwsjson11_deserializeErrorWAFNonEmptyEntityException(response, errorBody) case strings.EqualFold("WAFNonexistentItemException", errorCode): return awsAwsjson11_deserializeErrorWAFNonexistentItemException(response, errorBody) case strings.EqualFold("WAFReferencedItemException", errorCode): return awsAwsjson11_deserializeErrorWAFReferencedItemException(response, errorBody) case strings.EqualFold("WAFStaleDataException", errorCode): return awsAwsjson11_deserializeErrorWAFStaleDataException(response, errorBody) case strings.EqualFold("WAFTagOperationException", errorCode): return awsAwsjson11_deserializeErrorWAFTagOperationException(response, errorBody) case strings.EqualFold("WAFTagOperationInternalErrorException", errorCode): return awsAwsjson11_deserializeErrorWAFTagOperationInternalErrorException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson11_deserializeOpDeleteXssMatchSet struct { } func (*awsAwsjson11_deserializeOpDeleteXssMatchSet) ID() string { return "OperationDeserializer" } func (m *awsAwsjson11_deserializeOpDeleteXssMatchSet) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) if err != nil { return out, metadata, err } response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} } if response.StatusCode < 200 || response.StatusCode >= 300 { return out, metadata, awsAwsjson11_deserializeOpErrorDeleteXssMatchSet(response, &metadata) } output := &DeleteXssMatchSetOutput{} out.Result = output var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(response.Body, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } err = awsAwsjson11_deserializeOpDocumentDeleteXssMatchSetOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } return out, metadata, err } func awsAwsjson11_deserializeOpErrorDeleteXssMatchSet(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") if len(headerCode) != 0 { errorCode = restjson.SanitizeErrorCode(headerCode) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(headerCode) == 0 && len(jsonCode) != 0 { errorCode = restjson.SanitizeErrorCode(jsonCode) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("WAFInternalErrorException", errorCode): return awsAwsjson11_deserializeErrorWAFInternalErrorException(response, errorBody) case strings.EqualFold("WAFInvalidAccountException", errorCode): return awsAwsjson11_deserializeErrorWAFInvalidAccountException(response, errorBody) case strings.EqualFold("WAFNonEmptyEntityException", errorCode): return awsAwsjson11_deserializeErrorWAFNonEmptyEntityException(response, errorBody) case strings.EqualFold("WAFNonexistentItemException", errorCode): return awsAwsjson11_deserializeErrorWAFNonexistentItemException(response, errorBody) case strings.EqualFold("WAFReferencedItemException", errorCode): return awsAwsjson11_deserializeErrorWAFReferencedItemException(response, errorBody) case strings.EqualFold("WAFStaleDataException", errorCode): return awsAwsjson11_deserializeErrorWAFStaleDataException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson11_deserializeOpGetByteMatchSet struct { } func (*awsAwsjson11_deserializeOpGetByteMatchSet) ID() string { return "OperationDeserializer" } func (m *awsAwsjson11_deserializeOpGetByteMatchSet) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) if err != nil { return out, metadata, err } response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} } if response.StatusCode < 200 || response.StatusCode >= 300 { return out, metadata, awsAwsjson11_deserializeOpErrorGetByteMatchSet(response, &metadata) } output := &GetByteMatchSetOutput{} out.Result = output var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(response.Body, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } err = awsAwsjson11_deserializeOpDocumentGetByteMatchSetOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } return out, metadata, err } func awsAwsjson11_deserializeOpErrorGetByteMatchSet(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") if len(headerCode) != 0 { errorCode = restjson.SanitizeErrorCode(headerCode) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(headerCode) == 0 && len(jsonCode) != 0 { errorCode = restjson.SanitizeErrorCode(jsonCode) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("WAFInternalErrorException", errorCode): return awsAwsjson11_deserializeErrorWAFInternalErrorException(response, errorBody) case strings.EqualFold("WAFInvalidAccountException", errorCode): return awsAwsjson11_deserializeErrorWAFInvalidAccountException(response, errorBody) case strings.EqualFold("WAFNonexistentItemException", errorCode): return awsAwsjson11_deserializeErrorWAFNonexistentItemException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson11_deserializeOpGetChangeToken struct { } func (*awsAwsjson11_deserializeOpGetChangeToken) ID() string { return "OperationDeserializer" } func (m *awsAwsjson11_deserializeOpGetChangeToken) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) if err != nil { return out, metadata, err } response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} } if response.StatusCode < 200 || response.StatusCode >= 300 { return out, metadata, awsAwsjson11_deserializeOpErrorGetChangeToken(response, &metadata) } output := &GetChangeTokenOutput{} out.Result = output var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(response.Body, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } err = awsAwsjson11_deserializeOpDocumentGetChangeTokenOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } return out, metadata, err } func awsAwsjson11_deserializeOpErrorGetChangeToken(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") if len(headerCode) != 0 { errorCode = restjson.SanitizeErrorCode(headerCode) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(headerCode) == 0 && len(jsonCode) != 0 { errorCode = restjson.SanitizeErrorCode(jsonCode) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("WAFInternalErrorException", errorCode): return awsAwsjson11_deserializeErrorWAFInternalErrorException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson11_deserializeOpGetChangeTokenStatus struct { } func (*awsAwsjson11_deserializeOpGetChangeTokenStatus) ID() string { return "OperationDeserializer" } func (m *awsAwsjson11_deserializeOpGetChangeTokenStatus) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) if err != nil { return out, metadata, err } response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} } if response.StatusCode < 200 || response.StatusCode >= 300 { return out, metadata, awsAwsjson11_deserializeOpErrorGetChangeTokenStatus(response, &metadata) } output := &GetChangeTokenStatusOutput{} out.Result = output var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(response.Body, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } err = awsAwsjson11_deserializeOpDocumentGetChangeTokenStatusOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } return out, metadata, err } func awsAwsjson11_deserializeOpErrorGetChangeTokenStatus(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") if len(headerCode) != 0 { errorCode = restjson.SanitizeErrorCode(headerCode) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(headerCode) == 0 && len(jsonCode) != 0 { errorCode = restjson.SanitizeErrorCode(jsonCode) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("WAFInternalErrorException", errorCode): return awsAwsjson11_deserializeErrorWAFInternalErrorException(response, errorBody) case strings.EqualFold("WAFNonexistentItemException", errorCode): return awsAwsjson11_deserializeErrorWAFNonexistentItemException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson11_deserializeOpGetGeoMatchSet struct { } func (*awsAwsjson11_deserializeOpGetGeoMatchSet) ID() string { return "OperationDeserializer" } func (m *awsAwsjson11_deserializeOpGetGeoMatchSet) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) if err != nil { return out, metadata, err } response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} } if response.StatusCode < 200 || response.StatusCode >= 300 { return out, metadata, awsAwsjson11_deserializeOpErrorGetGeoMatchSet(response, &metadata) } output := &GetGeoMatchSetOutput{} out.Result = output var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(response.Body, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } err = awsAwsjson11_deserializeOpDocumentGetGeoMatchSetOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } return out, metadata, err } func awsAwsjson11_deserializeOpErrorGetGeoMatchSet(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") if len(headerCode) != 0 { errorCode = restjson.SanitizeErrorCode(headerCode) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(headerCode) == 0 && len(jsonCode) != 0 { errorCode = restjson.SanitizeErrorCode(jsonCode) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("WAFInternalErrorException", errorCode): return awsAwsjson11_deserializeErrorWAFInternalErrorException(response, errorBody) case strings.EqualFold("WAFInvalidAccountException", errorCode): return awsAwsjson11_deserializeErrorWAFInvalidAccountException(response, errorBody) case strings.EqualFold("WAFNonexistentItemException", errorCode): return awsAwsjson11_deserializeErrorWAFNonexistentItemException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson11_deserializeOpGetIPSet struct { } func (*awsAwsjson11_deserializeOpGetIPSet) ID() string { return "OperationDeserializer" } func (m *awsAwsjson11_deserializeOpGetIPSet) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) if err != nil { return out, metadata, err } response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} } if response.StatusCode < 200 || response.StatusCode >= 300 { return out, metadata, awsAwsjson11_deserializeOpErrorGetIPSet(response, &metadata) } output := &GetIPSetOutput{} out.Result = output var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(response.Body, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } err = awsAwsjson11_deserializeOpDocumentGetIPSetOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } return out, metadata, err } func awsAwsjson11_deserializeOpErrorGetIPSet(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") if len(headerCode) != 0 { errorCode = restjson.SanitizeErrorCode(headerCode) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(headerCode) == 0 && len(jsonCode) != 0 { errorCode = restjson.SanitizeErrorCode(jsonCode) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("WAFInternalErrorException", errorCode): return awsAwsjson11_deserializeErrorWAFInternalErrorException(response, errorBody) case strings.EqualFold("WAFInvalidAccountException", errorCode): return awsAwsjson11_deserializeErrorWAFInvalidAccountException(response, errorBody) case strings.EqualFold("WAFNonexistentItemException", errorCode): return awsAwsjson11_deserializeErrorWAFNonexistentItemException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson11_deserializeOpGetLoggingConfiguration struct { } func (*awsAwsjson11_deserializeOpGetLoggingConfiguration) ID() string { return "OperationDeserializer" } func (m *awsAwsjson11_deserializeOpGetLoggingConfiguration) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) if err != nil { return out, metadata, err } response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} } if response.StatusCode < 200 || response.StatusCode >= 300 { return out, metadata, awsAwsjson11_deserializeOpErrorGetLoggingConfiguration(response, &metadata) } output := &GetLoggingConfigurationOutput{} out.Result = output var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(response.Body, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } err = awsAwsjson11_deserializeOpDocumentGetLoggingConfigurationOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } return out, metadata, err } func awsAwsjson11_deserializeOpErrorGetLoggingConfiguration(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") if len(headerCode) != 0 { errorCode = restjson.SanitizeErrorCode(headerCode) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(headerCode) == 0 && len(jsonCode) != 0 { errorCode = restjson.SanitizeErrorCode(jsonCode) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("WAFInternalErrorException", errorCode): return awsAwsjson11_deserializeErrorWAFInternalErrorException(response, errorBody) case strings.EqualFold("WAFNonexistentItemException", errorCode): return awsAwsjson11_deserializeErrorWAFNonexistentItemException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson11_deserializeOpGetPermissionPolicy struct { } func (*awsAwsjson11_deserializeOpGetPermissionPolicy) ID() string { return "OperationDeserializer" } func (m *awsAwsjson11_deserializeOpGetPermissionPolicy) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) if err != nil { return out, metadata, err } response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} } if response.StatusCode < 200 || response.StatusCode >= 300 { return out, metadata, awsAwsjson11_deserializeOpErrorGetPermissionPolicy(response, &metadata) } output := &GetPermissionPolicyOutput{} out.Result = output var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(response.Body, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } err = awsAwsjson11_deserializeOpDocumentGetPermissionPolicyOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } return out, metadata, err } func awsAwsjson11_deserializeOpErrorGetPermissionPolicy(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") if len(headerCode) != 0 { errorCode = restjson.SanitizeErrorCode(headerCode) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(headerCode) == 0 && len(jsonCode) != 0 { errorCode = restjson.SanitizeErrorCode(jsonCode) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("WAFInternalErrorException", errorCode): return awsAwsjson11_deserializeErrorWAFInternalErrorException(response, errorBody) case strings.EqualFold("WAFNonexistentItemException", errorCode): return awsAwsjson11_deserializeErrorWAFNonexistentItemException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson11_deserializeOpGetRateBasedRule struct { } func (*awsAwsjson11_deserializeOpGetRateBasedRule) ID() string { return "OperationDeserializer" } func (m *awsAwsjson11_deserializeOpGetRateBasedRule) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) if err != nil { return out, metadata, err } response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} } if response.StatusCode < 200 || response.StatusCode >= 300 { return out, metadata, awsAwsjson11_deserializeOpErrorGetRateBasedRule(response, &metadata) } output := &GetRateBasedRuleOutput{} out.Result = output var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(response.Body, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } err = awsAwsjson11_deserializeOpDocumentGetRateBasedRuleOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } return out, metadata, err } func awsAwsjson11_deserializeOpErrorGetRateBasedRule(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") if len(headerCode) != 0 { errorCode = restjson.SanitizeErrorCode(headerCode) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(headerCode) == 0 && len(jsonCode) != 0 { errorCode = restjson.SanitizeErrorCode(jsonCode) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("WAFInternalErrorException", errorCode): return awsAwsjson11_deserializeErrorWAFInternalErrorException(response, errorBody) case strings.EqualFold("WAFInvalidAccountException", errorCode): return awsAwsjson11_deserializeErrorWAFInvalidAccountException(response, errorBody) case strings.EqualFold("WAFNonexistentItemException", errorCode): return awsAwsjson11_deserializeErrorWAFNonexistentItemException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson11_deserializeOpGetRateBasedRuleManagedKeys struct { } func (*awsAwsjson11_deserializeOpGetRateBasedRuleManagedKeys) ID() string { return "OperationDeserializer" } func (m *awsAwsjson11_deserializeOpGetRateBasedRuleManagedKeys) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) if err != nil { return out, metadata, err } response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} } if response.StatusCode < 200 || response.StatusCode >= 300 { return out, metadata, awsAwsjson11_deserializeOpErrorGetRateBasedRuleManagedKeys(response, &metadata) } output := &GetRateBasedRuleManagedKeysOutput{} out.Result = output var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(response.Body, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } err = awsAwsjson11_deserializeOpDocumentGetRateBasedRuleManagedKeysOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } return out, metadata, err } func awsAwsjson11_deserializeOpErrorGetRateBasedRuleManagedKeys(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") if len(headerCode) != 0 { errorCode = restjson.SanitizeErrorCode(headerCode) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(headerCode) == 0 && len(jsonCode) != 0 { errorCode = restjson.SanitizeErrorCode(jsonCode) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("WAFInternalErrorException", errorCode): return awsAwsjson11_deserializeErrorWAFInternalErrorException(response, errorBody) case strings.EqualFold("WAFInvalidAccountException", errorCode): return awsAwsjson11_deserializeErrorWAFInvalidAccountException(response, errorBody) case strings.EqualFold("WAFInvalidParameterException", errorCode): return awsAwsjson11_deserializeErrorWAFInvalidParameterException(response, errorBody) case strings.EqualFold("WAFNonexistentItemException", errorCode): return awsAwsjson11_deserializeErrorWAFNonexistentItemException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson11_deserializeOpGetRegexMatchSet struct { } func (*awsAwsjson11_deserializeOpGetRegexMatchSet) ID() string { return "OperationDeserializer" } func (m *awsAwsjson11_deserializeOpGetRegexMatchSet) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) if err != nil { return out, metadata, err } response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} } if response.StatusCode < 200 || response.StatusCode >= 300 { return out, metadata, awsAwsjson11_deserializeOpErrorGetRegexMatchSet(response, &metadata) } output := &GetRegexMatchSetOutput{} out.Result = output var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(response.Body, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } err = awsAwsjson11_deserializeOpDocumentGetRegexMatchSetOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } return out, metadata, err } func awsAwsjson11_deserializeOpErrorGetRegexMatchSet(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") if len(headerCode) != 0 { errorCode = restjson.SanitizeErrorCode(headerCode) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(headerCode) == 0 && len(jsonCode) != 0 { errorCode = restjson.SanitizeErrorCode(jsonCode) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("WAFInternalErrorException", errorCode): return awsAwsjson11_deserializeErrorWAFInternalErrorException(response, errorBody) case strings.EqualFold("WAFInvalidAccountException", errorCode): return awsAwsjson11_deserializeErrorWAFInvalidAccountException(response, errorBody) case strings.EqualFold("WAFNonexistentItemException", errorCode): return awsAwsjson11_deserializeErrorWAFNonexistentItemException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson11_deserializeOpGetRegexPatternSet struct { } func (*awsAwsjson11_deserializeOpGetRegexPatternSet) ID() string { return "OperationDeserializer" } func (m *awsAwsjson11_deserializeOpGetRegexPatternSet) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) if err != nil { return out, metadata, err } response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} } if response.StatusCode < 200 || response.StatusCode >= 300 { return out, metadata, awsAwsjson11_deserializeOpErrorGetRegexPatternSet(response, &metadata) } output := &GetRegexPatternSetOutput{} out.Result = output var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(response.Body, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } err = awsAwsjson11_deserializeOpDocumentGetRegexPatternSetOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } return out, metadata, err } func awsAwsjson11_deserializeOpErrorGetRegexPatternSet(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") if len(headerCode) != 0 { errorCode = restjson.SanitizeErrorCode(headerCode) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(headerCode) == 0 && len(jsonCode) != 0 { errorCode = restjson.SanitizeErrorCode(jsonCode) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("WAFInternalErrorException", errorCode): return awsAwsjson11_deserializeErrorWAFInternalErrorException(response, errorBody) case strings.EqualFold("WAFInvalidAccountException", errorCode): return awsAwsjson11_deserializeErrorWAFInvalidAccountException(response, errorBody) case strings.EqualFold("WAFNonexistentItemException", errorCode): return awsAwsjson11_deserializeErrorWAFNonexistentItemException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson11_deserializeOpGetRule struct { } func (*awsAwsjson11_deserializeOpGetRule) ID() string { return "OperationDeserializer" } func (m *awsAwsjson11_deserializeOpGetRule) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) if err != nil { return out, metadata, err } response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} } if response.StatusCode < 200 || response.StatusCode >= 300 { return out, metadata, awsAwsjson11_deserializeOpErrorGetRule(response, &metadata) } output := &GetRuleOutput{} out.Result = output var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(response.Body, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } err = awsAwsjson11_deserializeOpDocumentGetRuleOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } return out, metadata, err } func awsAwsjson11_deserializeOpErrorGetRule(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") if len(headerCode) != 0 { errorCode = restjson.SanitizeErrorCode(headerCode) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(headerCode) == 0 && len(jsonCode) != 0 { errorCode = restjson.SanitizeErrorCode(jsonCode) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("WAFInternalErrorException", errorCode): return awsAwsjson11_deserializeErrorWAFInternalErrorException(response, errorBody) case strings.EqualFold("WAFInvalidAccountException", errorCode): return awsAwsjson11_deserializeErrorWAFInvalidAccountException(response, errorBody) case strings.EqualFold("WAFNonexistentItemException", errorCode): return awsAwsjson11_deserializeErrorWAFNonexistentItemException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson11_deserializeOpGetRuleGroup struct { } func (*awsAwsjson11_deserializeOpGetRuleGroup) ID() string { return "OperationDeserializer" } func (m *awsAwsjson11_deserializeOpGetRuleGroup) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) if err != nil { return out, metadata, err } response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} } if response.StatusCode < 200 || response.StatusCode >= 300 { return out, metadata, awsAwsjson11_deserializeOpErrorGetRuleGroup(response, &metadata) } output := &GetRuleGroupOutput{} out.Result = output var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(response.Body, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } err = awsAwsjson11_deserializeOpDocumentGetRuleGroupOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } return out, metadata, err } func awsAwsjson11_deserializeOpErrorGetRuleGroup(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") if len(headerCode) != 0 { errorCode = restjson.SanitizeErrorCode(headerCode) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(headerCode) == 0 && len(jsonCode) != 0 { errorCode = restjson.SanitizeErrorCode(jsonCode) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("WAFInternalErrorException", errorCode): return awsAwsjson11_deserializeErrorWAFInternalErrorException(response, errorBody) case strings.EqualFold("WAFNonexistentItemException", errorCode): return awsAwsjson11_deserializeErrorWAFNonexistentItemException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson11_deserializeOpGetSampledRequests struct { } func (*awsAwsjson11_deserializeOpGetSampledRequests) ID() string { return "OperationDeserializer" } func (m *awsAwsjson11_deserializeOpGetSampledRequests) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) if err != nil { return out, metadata, err } response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} } if response.StatusCode < 200 || response.StatusCode >= 300 { return out, metadata, awsAwsjson11_deserializeOpErrorGetSampledRequests(response, &metadata) } output := &GetSampledRequestsOutput{} out.Result = output var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(response.Body, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } err = awsAwsjson11_deserializeOpDocumentGetSampledRequestsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } return out, metadata, err } func awsAwsjson11_deserializeOpErrorGetSampledRequests(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") if len(headerCode) != 0 { errorCode = restjson.SanitizeErrorCode(headerCode) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(headerCode) == 0 && len(jsonCode) != 0 { errorCode = restjson.SanitizeErrorCode(jsonCode) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("WAFInternalErrorException", errorCode): return awsAwsjson11_deserializeErrorWAFInternalErrorException(response, errorBody) case strings.EqualFold("WAFNonexistentItemException", errorCode): return awsAwsjson11_deserializeErrorWAFNonexistentItemException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson11_deserializeOpGetSizeConstraintSet struct { } func (*awsAwsjson11_deserializeOpGetSizeConstraintSet) ID() string { return "OperationDeserializer" } func (m *awsAwsjson11_deserializeOpGetSizeConstraintSet) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) if err != nil { return out, metadata, err } response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} } if response.StatusCode < 200 || response.StatusCode >= 300 { return out, metadata, awsAwsjson11_deserializeOpErrorGetSizeConstraintSet(response, &metadata) } output := &GetSizeConstraintSetOutput{} out.Result = output var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(response.Body, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } err = awsAwsjson11_deserializeOpDocumentGetSizeConstraintSetOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } return out, metadata, err } func awsAwsjson11_deserializeOpErrorGetSizeConstraintSet(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") if len(headerCode) != 0 { errorCode = restjson.SanitizeErrorCode(headerCode) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(headerCode) == 0 && len(jsonCode) != 0 { errorCode = restjson.SanitizeErrorCode(jsonCode) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("WAFInternalErrorException", errorCode): return awsAwsjson11_deserializeErrorWAFInternalErrorException(response, errorBody) case strings.EqualFold("WAFInvalidAccountException", errorCode): return awsAwsjson11_deserializeErrorWAFInvalidAccountException(response, errorBody) case strings.EqualFold("WAFNonexistentItemException", errorCode): return awsAwsjson11_deserializeErrorWAFNonexistentItemException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson11_deserializeOpGetSqlInjectionMatchSet struct { } func (*awsAwsjson11_deserializeOpGetSqlInjectionMatchSet) ID() string { return "OperationDeserializer" } func (m *awsAwsjson11_deserializeOpGetSqlInjectionMatchSet) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) if err != nil { return out, metadata, err } response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} } if response.StatusCode < 200 || response.StatusCode >= 300 { return out, metadata, awsAwsjson11_deserializeOpErrorGetSqlInjectionMatchSet(response, &metadata) } output := &GetSqlInjectionMatchSetOutput{} out.Result = output var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(response.Body, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } err = awsAwsjson11_deserializeOpDocumentGetSqlInjectionMatchSetOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } return out, metadata, err } func awsAwsjson11_deserializeOpErrorGetSqlInjectionMatchSet(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") if len(headerCode) != 0 { errorCode = restjson.SanitizeErrorCode(headerCode) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(headerCode) == 0 && len(jsonCode) != 0 { errorCode = restjson.SanitizeErrorCode(jsonCode) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("WAFInternalErrorException", errorCode): return awsAwsjson11_deserializeErrorWAFInternalErrorException(response, errorBody) case strings.EqualFold("WAFInvalidAccountException", errorCode): return awsAwsjson11_deserializeErrorWAFInvalidAccountException(response, errorBody) case strings.EqualFold("WAFNonexistentItemException", errorCode): return awsAwsjson11_deserializeErrorWAFNonexistentItemException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson11_deserializeOpGetWebACL struct { } func (*awsAwsjson11_deserializeOpGetWebACL) ID() string { return "OperationDeserializer" } func (m *awsAwsjson11_deserializeOpGetWebACL) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) if err != nil { return out, metadata, err } response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} } if response.StatusCode < 200 || response.StatusCode >= 300 { return out, metadata, awsAwsjson11_deserializeOpErrorGetWebACL(response, &metadata) } output := &GetWebACLOutput{} out.Result = output var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(response.Body, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } err = awsAwsjson11_deserializeOpDocumentGetWebACLOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } return out, metadata, err } func awsAwsjson11_deserializeOpErrorGetWebACL(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") if len(headerCode) != 0 { errorCode = restjson.SanitizeErrorCode(headerCode) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(headerCode) == 0 && len(jsonCode) != 0 { errorCode = restjson.SanitizeErrorCode(jsonCode) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("WAFInternalErrorException", errorCode): return awsAwsjson11_deserializeErrorWAFInternalErrorException(response, errorBody) case strings.EqualFold("WAFInvalidAccountException", errorCode): return awsAwsjson11_deserializeErrorWAFInvalidAccountException(response, errorBody) case strings.EqualFold("WAFNonexistentItemException", errorCode): return awsAwsjson11_deserializeErrorWAFNonexistentItemException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson11_deserializeOpGetXssMatchSet struct { } func (*awsAwsjson11_deserializeOpGetXssMatchSet) ID() string { return "OperationDeserializer" } func (m *awsAwsjson11_deserializeOpGetXssMatchSet) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) if err != nil { return out, metadata, err } response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} } if response.StatusCode < 200 || response.StatusCode >= 300 { return out, metadata, awsAwsjson11_deserializeOpErrorGetXssMatchSet(response, &metadata) } output := &GetXssMatchSetOutput{} out.Result = output var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(response.Body, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } err = awsAwsjson11_deserializeOpDocumentGetXssMatchSetOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } return out, metadata, err } func awsAwsjson11_deserializeOpErrorGetXssMatchSet(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") if len(headerCode) != 0 { errorCode = restjson.SanitizeErrorCode(headerCode) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(headerCode) == 0 && len(jsonCode) != 0 { errorCode = restjson.SanitizeErrorCode(jsonCode) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("WAFInternalErrorException", errorCode): return awsAwsjson11_deserializeErrorWAFInternalErrorException(response, errorBody) case strings.EqualFold("WAFInvalidAccountException", errorCode): return awsAwsjson11_deserializeErrorWAFInvalidAccountException(response, errorBody) case strings.EqualFold("WAFNonexistentItemException", errorCode): return awsAwsjson11_deserializeErrorWAFNonexistentItemException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson11_deserializeOpListActivatedRulesInRuleGroup struct { } func (*awsAwsjson11_deserializeOpListActivatedRulesInRuleGroup) ID() string { return "OperationDeserializer" } func (m *awsAwsjson11_deserializeOpListActivatedRulesInRuleGroup) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) if err != nil { return out, metadata, err } response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} } if response.StatusCode < 200 || response.StatusCode >= 300 { return out, metadata, awsAwsjson11_deserializeOpErrorListActivatedRulesInRuleGroup(response, &metadata) } output := &ListActivatedRulesInRuleGroupOutput{} out.Result = output var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(response.Body, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } err = awsAwsjson11_deserializeOpDocumentListActivatedRulesInRuleGroupOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } return out, metadata, err } func awsAwsjson11_deserializeOpErrorListActivatedRulesInRuleGroup(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") if len(headerCode) != 0 { errorCode = restjson.SanitizeErrorCode(headerCode) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(headerCode) == 0 && len(jsonCode) != 0 { errorCode = restjson.SanitizeErrorCode(jsonCode) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("WAFInternalErrorException", errorCode): return awsAwsjson11_deserializeErrorWAFInternalErrorException(response, errorBody) case strings.EqualFold("WAFInvalidParameterException", errorCode): return awsAwsjson11_deserializeErrorWAFInvalidParameterException(response, errorBody) case strings.EqualFold("WAFNonexistentItemException", errorCode): return awsAwsjson11_deserializeErrorWAFNonexistentItemException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson11_deserializeOpListByteMatchSets struct { } func (*awsAwsjson11_deserializeOpListByteMatchSets) ID() string { return "OperationDeserializer" } func (m *awsAwsjson11_deserializeOpListByteMatchSets) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) if err != nil { return out, metadata, err } response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} } if response.StatusCode < 200 || response.StatusCode >= 300 { return out, metadata, awsAwsjson11_deserializeOpErrorListByteMatchSets(response, &metadata) } output := &ListByteMatchSetsOutput{} out.Result = output var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(response.Body, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } err = awsAwsjson11_deserializeOpDocumentListByteMatchSetsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } return out, metadata, err } func awsAwsjson11_deserializeOpErrorListByteMatchSets(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") if len(headerCode) != 0 { errorCode = restjson.SanitizeErrorCode(headerCode) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(headerCode) == 0 && len(jsonCode) != 0 { errorCode = restjson.SanitizeErrorCode(jsonCode) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("WAFInternalErrorException", errorCode): return awsAwsjson11_deserializeErrorWAFInternalErrorException(response, errorBody) case strings.EqualFold("WAFInvalidAccountException", errorCode): return awsAwsjson11_deserializeErrorWAFInvalidAccountException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson11_deserializeOpListGeoMatchSets struct { } func (*awsAwsjson11_deserializeOpListGeoMatchSets) ID() string { return "OperationDeserializer" } func (m *awsAwsjson11_deserializeOpListGeoMatchSets) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) if err != nil { return out, metadata, err } response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} } if response.StatusCode < 200 || response.StatusCode >= 300 { return out, metadata, awsAwsjson11_deserializeOpErrorListGeoMatchSets(response, &metadata) } output := &ListGeoMatchSetsOutput{} out.Result = output var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(response.Body, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } err = awsAwsjson11_deserializeOpDocumentListGeoMatchSetsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } return out, metadata, err } func awsAwsjson11_deserializeOpErrorListGeoMatchSets(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") if len(headerCode) != 0 { errorCode = restjson.SanitizeErrorCode(headerCode) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(headerCode) == 0 && len(jsonCode) != 0 { errorCode = restjson.SanitizeErrorCode(jsonCode) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("WAFInternalErrorException", errorCode): return awsAwsjson11_deserializeErrorWAFInternalErrorException(response, errorBody) case strings.EqualFold("WAFInvalidAccountException", errorCode): return awsAwsjson11_deserializeErrorWAFInvalidAccountException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson11_deserializeOpListIPSets struct { } func (*awsAwsjson11_deserializeOpListIPSets) ID() string { return "OperationDeserializer" } func (m *awsAwsjson11_deserializeOpListIPSets) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) if err != nil { return out, metadata, err } response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} } if response.StatusCode < 200 || response.StatusCode >= 300 { return out, metadata, awsAwsjson11_deserializeOpErrorListIPSets(response, &metadata) } output := &ListIPSetsOutput{} out.Result = output var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(response.Body, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } err = awsAwsjson11_deserializeOpDocumentListIPSetsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } return out, metadata, err } func awsAwsjson11_deserializeOpErrorListIPSets(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") if len(headerCode) != 0 { errorCode = restjson.SanitizeErrorCode(headerCode) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(headerCode) == 0 && len(jsonCode) != 0 { errorCode = restjson.SanitizeErrorCode(jsonCode) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("WAFInternalErrorException", errorCode): return awsAwsjson11_deserializeErrorWAFInternalErrorException(response, errorBody) case strings.EqualFold("WAFInvalidAccountException", errorCode): return awsAwsjson11_deserializeErrorWAFInvalidAccountException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson11_deserializeOpListLoggingConfigurations struct { } func (*awsAwsjson11_deserializeOpListLoggingConfigurations) ID() string { return "OperationDeserializer" } func (m *awsAwsjson11_deserializeOpListLoggingConfigurations) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) if err != nil { return out, metadata, err } response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} } if response.StatusCode < 200 || response.StatusCode >= 300 { return out, metadata, awsAwsjson11_deserializeOpErrorListLoggingConfigurations(response, &metadata) } output := &ListLoggingConfigurationsOutput{} out.Result = output var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(response.Body, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } err = awsAwsjson11_deserializeOpDocumentListLoggingConfigurationsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } return out, metadata, err } func awsAwsjson11_deserializeOpErrorListLoggingConfigurations(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") if len(headerCode) != 0 { errorCode = restjson.SanitizeErrorCode(headerCode) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(headerCode) == 0 && len(jsonCode) != 0 { errorCode = restjson.SanitizeErrorCode(jsonCode) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("WAFInternalErrorException", errorCode): return awsAwsjson11_deserializeErrorWAFInternalErrorException(response, errorBody) case strings.EqualFold("WAFInvalidParameterException", errorCode): return awsAwsjson11_deserializeErrorWAFInvalidParameterException(response, errorBody) case strings.EqualFold("WAFNonexistentItemException", errorCode): return awsAwsjson11_deserializeErrorWAFNonexistentItemException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson11_deserializeOpListRateBasedRules struct { } func (*awsAwsjson11_deserializeOpListRateBasedRules) ID() string { return "OperationDeserializer" } func (m *awsAwsjson11_deserializeOpListRateBasedRules) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) if err != nil { return out, metadata, err } response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} } if response.StatusCode < 200 || response.StatusCode >= 300 { return out, metadata, awsAwsjson11_deserializeOpErrorListRateBasedRules(response, &metadata) } output := &ListRateBasedRulesOutput{} out.Result = output var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(response.Body, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } err = awsAwsjson11_deserializeOpDocumentListRateBasedRulesOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } return out, metadata, err } func awsAwsjson11_deserializeOpErrorListRateBasedRules(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") if len(headerCode) != 0 { errorCode = restjson.SanitizeErrorCode(headerCode) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(headerCode) == 0 && len(jsonCode) != 0 { errorCode = restjson.SanitizeErrorCode(jsonCode) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("WAFInternalErrorException", errorCode): return awsAwsjson11_deserializeErrorWAFInternalErrorException(response, errorBody) case strings.EqualFold("WAFInvalidAccountException", errorCode): return awsAwsjson11_deserializeErrorWAFInvalidAccountException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson11_deserializeOpListRegexMatchSets struct { } func (*awsAwsjson11_deserializeOpListRegexMatchSets) ID() string { return "OperationDeserializer" } func (m *awsAwsjson11_deserializeOpListRegexMatchSets) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) if err != nil { return out, metadata, err } response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} } if response.StatusCode < 200 || response.StatusCode >= 300 { return out, metadata, awsAwsjson11_deserializeOpErrorListRegexMatchSets(response, &metadata) } output := &ListRegexMatchSetsOutput{} out.Result = output var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(response.Body, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } err = awsAwsjson11_deserializeOpDocumentListRegexMatchSetsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } return out, metadata, err } func awsAwsjson11_deserializeOpErrorListRegexMatchSets(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") if len(headerCode) != 0 { errorCode = restjson.SanitizeErrorCode(headerCode) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(headerCode) == 0 && len(jsonCode) != 0 { errorCode = restjson.SanitizeErrorCode(jsonCode) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("WAFInternalErrorException", errorCode): return awsAwsjson11_deserializeErrorWAFInternalErrorException(response, errorBody) case strings.EqualFold("WAFInvalidAccountException", errorCode): return awsAwsjson11_deserializeErrorWAFInvalidAccountException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson11_deserializeOpListRegexPatternSets struct { } func (*awsAwsjson11_deserializeOpListRegexPatternSets) ID() string { return "OperationDeserializer" } func (m *awsAwsjson11_deserializeOpListRegexPatternSets) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) if err != nil { return out, metadata, err } response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} } if response.StatusCode < 200 || response.StatusCode >= 300 { return out, metadata, awsAwsjson11_deserializeOpErrorListRegexPatternSets(response, &metadata) } output := &ListRegexPatternSetsOutput{} out.Result = output var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(response.Body, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } err = awsAwsjson11_deserializeOpDocumentListRegexPatternSetsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } return out, metadata, err } func awsAwsjson11_deserializeOpErrorListRegexPatternSets(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") if len(headerCode) != 0 { errorCode = restjson.SanitizeErrorCode(headerCode) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(headerCode) == 0 && len(jsonCode) != 0 { errorCode = restjson.SanitizeErrorCode(jsonCode) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("WAFInternalErrorException", errorCode): return awsAwsjson11_deserializeErrorWAFInternalErrorException(response, errorBody) case strings.EqualFold("WAFInvalidAccountException", errorCode): return awsAwsjson11_deserializeErrorWAFInvalidAccountException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson11_deserializeOpListRuleGroups struct { } func (*awsAwsjson11_deserializeOpListRuleGroups) ID() string { return "OperationDeserializer" } func (m *awsAwsjson11_deserializeOpListRuleGroups) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) if err != nil { return out, metadata, err } response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} } if response.StatusCode < 200 || response.StatusCode >= 300 { return out, metadata, awsAwsjson11_deserializeOpErrorListRuleGroups(response, &metadata) } output := &ListRuleGroupsOutput{} out.Result = output var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(response.Body, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } err = awsAwsjson11_deserializeOpDocumentListRuleGroupsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } return out, metadata, err } func awsAwsjson11_deserializeOpErrorListRuleGroups(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") if len(headerCode) != 0 { errorCode = restjson.SanitizeErrorCode(headerCode) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(headerCode) == 0 && len(jsonCode) != 0 { errorCode = restjson.SanitizeErrorCode(jsonCode) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("WAFInternalErrorException", errorCode): return awsAwsjson11_deserializeErrorWAFInternalErrorException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson11_deserializeOpListRules struct { } func (*awsAwsjson11_deserializeOpListRules) ID() string { return "OperationDeserializer" } func (m *awsAwsjson11_deserializeOpListRules) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) if err != nil { return out, metadata, err } response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} } if response.StatusCode < 200 || response.StatusCode >= 300 { return out, metadata, awsAwsjson11_deserializeOpErrorListRules(response, &metadata) } output := &ListRulesOutput{} out.Result = output var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(response.Body, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } err = awsAwsjson11_deserializeOpDocumentListRulesOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } return out, metadata, err } func awsAwsjson11_deserializeOpErrorListRules(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") if len(headerCode) != 0 { errorCode = restjson.SanitizeErrorCode(headerCode) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(headerCode) == 0 && len(jsonCode) != 0 { errorCode = restjson.SanitizeErrorCode(jsonCode) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("WAFInternalErrorException", errorCode): return awsAwsjson11_deserializeErrorWAFInternalErrorException(response, errorBody) case strings.EqualFold("WAFInvalidAccountException", errorCode): return awsAwsjson11_deserializeErrorWAFInvalidAccountException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson11_deserializeOpListSizeConstraintSets struct { } func (*awsAwsjson11_deserializeOpListSizeConstraintSets) ID() string { return "OperationDeserializer" } func (m *awsAwsjson11_deserializeOpListSizeConstraintSets) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) if err != nil { return out, metadata, err } response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} } if response.StatusCode < 200 || response.StatusCode >= 300 { return out, metadata, awsAwsjson11_deserializeOpErrorListSizeConstraintSets(response, &metadata) } output := &ListSizeConstraintSetsOutput{} out.Result = output var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(response.Body, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } err = awsAwsjson11_deserializeOpDocumentListSizeConstraintSetsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } return out, metadata, err } func awsAwsjson11_deserializeOpErrorListSizeConstraintSets(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") if len(headerCode) != 0 { errorCode = restjson.SanitizeErrorCode(headerCode) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(headerCode) == 0 && len(jsonCode) != 0 { errorCode = restjson.SanitizeErrorCode(jsonCode) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("WAFInternalErrorException", errorCode): return awsAwsjson11_deserializeErrorWAFInternalErrorException(response, errorBody) case strings.EqualFold("WAFInvalidAccountException", errorCode): return awsAwsjson11_deserializeErrorWAFInvalidAccountException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson11_deserializeOpListSqlInjectionMatchSets struct { } func (*awsAwsjson11_deserializeOpListSqlInjectionMatchSets) ID() string { return "OperationDeserializer" } func (m *awsAwsjson11_deserializeOpListSqlInjectionMatchSets) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) if err != nil { return out, metadata, err } response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} } if response.StatusCode < 200 || response.StatusCode >= 300 { return out, metadata, awsAwsjson11_deserializeOpErrorListSqlInjectionMatchSets(response, &metadata) } output := &ListSqlInjectionMatchSetsOutput{} out.Result = output var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(response.Body, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } err = awsAwsjson11_deserializeOpDocumentListSqlInjectionMatchSetsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } return out, metadata, err } func awsAwsjson11_deserializeOpErrorListSqlInjectionMatchSets(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") if len(headerCode) != 0 { errorCode = restjson.SanitizeErrorCode(headerCode) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(headerCode) == 0 && len(jsonCode) != 0 { errorCode = restjson.SanitizeErrorCode(jsonCode) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("WAFInternalErrorException", errorCode): return awsAwsjson11_deserializeErrorWAFInternalErrorException(response, errorBody) case strings.EqualFold("WAFInvalidAccountException", errorCode): return awsAwsjson11_deserializeErrorWAFInvalidAccountException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson11_deserializeOpListSubscribedRuleGroups struct { } func (*awsAwsjson11_deserializeOpListSubscribedRuleGroups) ID() string { return "OperationDeserializer" } func (m *awsAwsjson11_deserializeOpListSubscribedRuleGroups) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) if err != nil { return out, metadata, err } response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} } if response.StatusCode < 200 || response.StatusCode >= 300 { return out, metadata, awsAwsjson11_deserializeOpErrorListSubscribedRuleGroups(response, &metadata) } output := &ListSubscribedRuleGroupsOutput{} out.Result = output var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(response.Body, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } err = awsAwsjson11_deserializeOpDocumentListSubscribedRuleGroupsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } return out, metadata, err } func awsAwsjson11_deserializeOpErrorListSubscribedRuleGroups(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") if len(headerCode) != 0 { errorCode = restjson.SanitizeErrorCode(headerCode) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(headerCode) == 0 && len(jsonCode) != 0 { errorCode = restjson.SanitizeErrorCode(jsonCode) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("WAFInternalErrorException", errorCode): return awsAwsjson11_deserializeErrorWAFInternalErrorException(response, errorBody) case strings.EqualFold("WAFNonexistentItemException", errorCode): return awsAwsjson11_deserializeErrorWAFNonexistentItemException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson11_deserializeOpListTagsForResource struct { } func (*awsAwsjson11_deserializeOpListTagsForResource) ID() string { return "OperationDeserializer" } func (m *awsAwsjson11_deserializeOpListTagsForResource) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) if err != nil { return out, metadata, err } response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} } if response.StatusCode < 200 || response.StatusCode >= 300 { return out, metadata, awsAwsjson11_deserializeOpErrorListTagsForResource(response, &metadata) } output := &ListTagsForResourceOutput{} out.Result = output var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(response.Body, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } err = awsAwsjson11_deserializeOpDocumentListTagsForResourceOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } return out, metadata, err } func awsAwsjson11_deserializeOpErrorListTagsForResource(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") if len(headerCode) != 0 { errorCode = restjson.SanitizeErrorCode(headerCode) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(headerCode) == 0 && len(jsonCode) != 0 { errorCode = restjson.SanitizeErrorCode(jsonCode) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("WAFBadRequestException", errorCode): return awsAwsjson11_deserializeErrorWAFBadRequestException(response, errorBody) case strings.EqualFold("WAFInternalErrorException", errorCode): return awsAwsjson11_deserializeErrorWAFInternalErrorException(response, errorBody) case strings.EqualFold("WAFInvalidParameterException", errorCode): return awsAwsjson11_deserializeErrorWAFInvalidParameterException(response, errorBody) case strings.EqualFold("WAFNonexistentItemException", errorCode): return awsAwsjson11_deserializeErrorWAFNonexistentItemException(response, errorBody) case strings.EqualFold("WAFTagOperationException", errorCode): return awsAwsjson11_deserializeErrorWAFTagOperationException(response, errorBody) case strings.EqualFold("WAFTagOperationInternalErrorException", errorCode): return awsAwsjson11_deserializeErrorWAFTagOperationInternalErrorException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson11_deserializeOpListWebACLs struct { } func (*awsAwsjson11_deserializeOpListWebACLs) ID() string { return "OperationDeserializer" } func (m *awsAwsjson11_deserializeOpListWebACLs) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) if err != nil { return out, metadata, err } response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} } if response.StatusCode < 200 || response.StatusCode >= 300 { return out, metadata, awsAwsjson11_deserializeOpErrorListWebACLs(response, &metadata) } output := &ListWebACLsOutput{} out.Result = output var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(response.Body, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } err = awsAwsjson11_deserializeOpDocumentListWebACLsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } return out, metadata, err } func awsAwsjson11_deserializeOpErrorListWebACLs(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") if len(headerCode) != 0 { errorCode = restjson.SanitizeErrorCode(headerCode) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(headerCode) == 0 && len(jsonCode) != 0 { errorCode = restjson.SanitizeErrorCode(jsonCode) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("WAFInternalErrorException", errorCode): return awsAwsjson11_deserializeErrorWAFInternalErrorException(response, errorBody) case strings.EqualFold("WAFInvalidAccountException", errorCode): return awsAwsjson11_deserializeErrorWAFInvalidAccountException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson11_deserializeOpListXssMatchSets struct { } func (*awsAwsjson11_deserializeOpListXssMatchSets) ID() string { return "OperationDeserializer" } func (m *awsAwsjson11_deserializeOpListXssMatchSets) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) if err != nil { return out, metadata, err } response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} } if response.StatusCode < 200 || response.StatusCode >= 300 { return out, metadata, awsAwsjson11_deserializeOpErrorListXssMatchSets(response, &metadata) } output := &ListXssMatchSetsOutput{} out.Result = output var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(response.Body, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } err = awsAwsjson11_deserializeOpDocumentListXssMatchSetsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } return out, metadata, err } func awsAwsjson11_deserializeOpErrorListXssMatchSets(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") if len(headerCode) != 0 { errorCode = restjson.SanitizeErrorCode(headerCode) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(headerCode) == 0 && len(jsonCode) != 0 { errorCode = restjson.SanitizeErrorCode(jsonCode) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("WAFInternalErrorException", errorCode): return awsAwsjson11_deserializeErrorWAFInternalErrorException(response, errorBody) case strings.EqualFold("WAFInvalidAccountException", errorCode): return awsAwsjson11_deserializeErrorWAFInvalidAccountException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson11_deserializeOpPutLoggingConfiguration struct { } func (*awsAwsjson11_deserializeOpPutLoggingConfiguration) ID() string { return "OperationDeserializer" } func (m *awsAwsjson11_deserializeOpPutLoggingConfiguration) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) if err != nil { return out, metadata, err } response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} } if response.StatusCode < 200 || response.StatusCode >= 300 { return out, metadata, awsAwsjson11_deserializeOpErrorPutLoggingConfiguration(response, &metadata) } output := &PutLoggingConfigurationOutput{} out.Result = output var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(response.Body, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } err = awsAwsjson11_deserializeOpDocumentPutLoggingConfigurationOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } return out, metadata, err } func awsAwsjson11_deserializeOpErrorPutLoggingConfiguration(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") if len(headerCode) != 0 { errorCode = restjson.SanitizeErrorCode(headerCode) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(headerCode) == 0 && len(jsonCode) != 0 { errorCode = restjson.SanitizeErrorCode(jsonCode) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("WAFInternalErrorException", errorCode): return awsAwsjson11_deserializeErrorWAFInternalErrorException(response, errorBody) case strings.EqualFold("WAFNonexistentItemException", errorCode): return awsAwsjson11_deserializeErrorWAFNonexistentItemException(response, errorBody) case strings.EqualFold("WAFServiceLinkedRoleErrorException", errorCode): return awsAwsjson11_deserializeErrorWAFServiceLinkedRoleErrorException(response, errorBody) case strings.EqualFold("WAFStaleDataException", errorCode): return awsAwsjson11_deserializeErrorWAFStaleDataException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson11_deserializeOpPutPermissionPolicy struct { } func (*awsAwsjson11_deserializeOpPutPermissionPolicy) ID() string { return "OperationDeserializer" } func (m *awsAwsjson11_deserializeOpPutPermissionPolicy) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) if err != nil { return out, metadata, err } response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} } if response.StatusCode < 200 || response.StatusCode >= 300 { return out, metadata, awsAwsjson11_deserializeOpErrorPutPermissionPolicy(response, &metadata) } output := &PutPermissionPolicyOutput{} out.Result = output var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(response.Body, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } err = awsAwsjson11_deserializeOpDocumentPutPermissionPolicyOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } return out, metadata, err } func awsAwsjson11_deserializeOpErrorPutPermissionPolicy(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") if len(headerCode) != 0 { errorCode = restjson.SanitizeErrorCode(headerCode) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(headerCode) == 0 && len(jsonCode) != 0 { errorCode = restjson.SanitizeErrorCode(jsonCode) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("WAFInternalErrorException", errorCode): return awsAwsjson11_deserializeErrorWAFInternalErrorException(response, errorBody) case strings.EqualFold("WAFInvalidPermissionPolicyException", errorCode): return awsAwsjson11_deserializeErrorWAFInvalidPermissionPolicyException(response, errorBody) case strings.EqualFold("WAFNonexistentItemException", errorCode): return awsAwsjson11_deserializeErrorWAFNonexistentItemException(response, errorBody) case strings.EqualFold("WAFStaleDataException", errorCode): return awsAwsjson11_deserializeErrorWAFStaleDataException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson11_deserializeOpTagResource struct { } func (*awsAwsjson11_deserializeOpTagResource) ID() string { return "OperationDeserializer" } func (m *awsAwsjson11_deserializeOpTagResource) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) if err != nil { return out, metadata, err } response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} } if response.StatusCode < 200 || response.StatusCode >= 300 { return out, metadata, awsAwsjson11_deserializeOpErrorTagResource(response, &metadata) } output := &TagResourceOutput{} out.Result = output var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(response.Body, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } err = awsAwsjson11_deserializeOpDocumentTagResourceOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } return out, metadata, err } func awsAwsjson11_deserializeOpErrorTagResource(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") if len(headerCode) != 0 { errorCode = restjson.SanitizeErrorCode(headerCode) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(headerCode) == 0 && len(jsonCode) != 0 { errorCode = restjson.SanitizeErrorCode(jsonCode) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("WAFBadRequestException", errorCode): return awsAwsjson11_deserializeErrorWAFBadRequestException(response, errorBody) case strings.EqualFold("WAFInternalErrorException", errorCode): return awsAwsjson11_deserializeErrorWAFInternalErrorException(response, errorBody) case strings.EqualFold("WAFInvalidParameterException", errorCode): return awsAwsjson11_deserializeErrorWAFInvalidParameterException(response, errorBody) case strings.EqualFold("WAFLimitsExceededException", errorCode): return awsAwsjson11_deserializeErrorWAFLimitsExceededException(response, errorBody) case strings.EqualFold("WAFNonexistentItemException", errorCode): return awsAwsjson11_deserializeErrorWAFNonexistentItemException(response, errorBody) case strings.EqualFold("WAFTagOperationException", errorCode): return awsAwsjson11_deserializeErrorWAFTagOperationException(response, errorBody) case strings.EqualFold("WAFTagOperationInternalErrorException", errorCode): return awsAwsjson11_deserializeErrorWAFTagOperationInternalErrorException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson11_deserializeOpUntagResource struct { } func (*awsAwsjson11_deserializeOpUntagResource) ID() string { return "OperationDeserializer" } func (m *awsAwsjson11_deserializeOpUntagResource) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) if err != nil { return out, metadata, err } response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} } if response.StatusCode < 200 || response.StatusCode >= 300 { return out, metadata, awsAwsjson11_deserializeOpErrorUntagResource(response, &metadata) } output := &UntagResourceOutput{} out.Result = output var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(response.Body, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } err = awsAwsjson11_deserializeOpDocumentUntagResourceOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } return out, metadata, err } func awsAwsjson11_deserializeOpErrorUntagResource(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") if len(headerCode) != 0 { errorCode = restjson.SanitizeErrorCode(headerCode) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(headerCode) == 0 && len(jsonCode) != 0 { errorCode = restjson.SanitizeErrorCode(jsonCode) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("WAFBadRequestException", errorCode): return awsAwsjson11_deserializeErrorWAFBadRequestException(response, errorBody) case strings.EqualFold("WAFInternalErrorException", errorCode): return awsAwsjson11_deserializeErrorWAFInternalErrorException(response, errorBody) case strings.EqualFold("WAFInvalidParameterException", errorCode): return awsAwsjson11_deserializeErrorWAFInvalidParameterException(response, errorBody) case strings.EqualFold("WAFNonexistentItemException", errorCode): return awsAwsjson11_deserializeErrorWAFNonexistentItemException(response, errorBody) case strings.EqualFold("WAFTagOperationException", errorCode): return awsAwsjson11_deserializeErrorWAFTagOperationException(response, errorBody) case strings.EqualFold("WAFTagOperationInternalErrorException", errorCode): return awsAwsjson11_deserializeErrorWAFTagOperationInternalErrorException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson11_deserializeOpUpdateByteMatchSet struct { } func (*awsAwsjson11_deserializeOpUpdateByteMatchSet) ID() string { return "OperationDeserializer" } func (m *awsAwsjson11_deserializeOpUpdateByteMatchSet) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) if err != nil { return out, metadata, err } response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} } if response.StatusCode < 200 || response.StatusCode >= 300 { return out, metadata, awsAwsjson11_deserializeOpErrorUpdateByteMatchSet(response, &metadata) } output := &UpdateByteMatchSetOutput{} out.Result = output var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(response.Body, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } err = awsAwsjson11_deserializeOpDocumentUpdateByteMatchSetOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } return out, metadata, err } func awsAwsjson11_deserializeOpErrorUpdateByteMatchSet(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") if len(headerCode) != 0 { errorCode = restjson.SanitizeErrorCode(headerCode) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(headerCode) == 0 && len(jsonCode) != 0 { errorCode = restjson.SanitizeErrorCode(jsonCode) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("WAFInternalErrorException", errorCode): return awsAwsjson11_deserializeErrorWAFInternalErrorException(response, errorBody) case strings.EqualFold("WAFInvalidAccountException", errorCode): return awsAwsjson11_deserializeErrorWAFInvalidAccountException(response, errorBody) case strings.EqualFold("WAFInvalidOperationException", errorCode): return awsAwsjson11_deserializeErrorWAFInvalidOperationException(response, errorBody) case strings.EqualFold("WAFInvalidParameterException", errorCode): return awsAwsjson11_deserializeErrorWAFInvalidParameterException(response, errorBody) case strings.EqualFold("WAFLimitsExceededException", errorCode): return awsAwsjson11_deserializeErrorWAFLimitsExceededException(response, errorBody) case strings.EqualFold("WAFNonexistentContainerException", errorCode): return awsAwsjson11_deserializeErrorWAFNonexistentContainerException(response, errorBody) case strings.EqualFold("WAFNonexistentItemException", errorCode): return awsAwsjson11_deserializeErrorWAFNonexistentItemException(response, errorBody) case strings.EqualFold("WAFStaleDataException", errorCode): return awsAwsjson11_deserializeErrorWAFStaleDataException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson11_deserializeOpUpdateGeoMatchSet struct { } func (*awsAwsjson11_deserializeOpUpdateGeoMatchSet) ID() string { return "OperationDeserializer" } func (m *awsAwsjson11_deserializeOpUpdateGeoMatchSet) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) if err != nil { return out, metadata, err } response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} } if response.StatusCode < 200 || response.StatusCode >= 300 { return out, metadata, awsAwsjson11_deserializeOpErrorUpdateGeoMatchSet(response, &metadata) } output := &UpdateGeoMatchSetOutput{} out.Result = output var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(response.Body, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } err = awsAwsjson11_deserializeOpDocumentUpdateGeoMatchSetOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } return out, metadata, err } func awsAwsjson11_deserializeOpErrorUpdateGeoMatchSet(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") if len(headerCode) != 0 { errorCode = restjson.SanitizeErrorCode(headerCode) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(headerCode) == 0 && len(jsonCode) != 0 { errorCode = restjson.SanitizeErrorCode(jsonCode) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("WAFInternalErrorException", errorCode): return awsAwsjson11_deserializeErrorWAFInternalErrorException(response, errorBody) case strings.EqualFold("WAFInvalidAccountException", errorCode): return awsAwsjson11_deserializeErrorWAFInvalidAccountException(response, errorBody) case strings.EqualFold("WAFInvalidOperationException", errorCode): return awsAwsjson11_deserializeErrorWAFInvalidOperationException(response, errorBody) case strings.EqualFold("WAFInvalidParameterException", errorCode): return awsAwsjson11_deserializeErrorWAFInvalidParameterException(response, errorBody) case strings.EqualFold("WAFLimitsExceededException", errorCode): return awsAwsjson11_deserializeErrorWAFLimitsExceededException(response, errorBody) case strings.EqualFold("WAFNonexistentContainerException", errorCode): return awsAwsjson11_deserializeErrorWAFNonexistentContainerException(response, errorBody) case strings.EqualFold("WAFNonexistentItemException", errorCode): return awsAwsjson11_deserializeErrorWAFNonexistentItemException(response, errorBody) case strings.EqualFold("WAFReferencedItemException", errorCode): return awsAwsjson11_deserializeErrorWAFReferencedItemException(response, errorBody) case strings.EqualFold("WAFStaleDataException", errorCode): return awsAwsjson11_deserializeErrorWAFStaleDataException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson11_deserializeOpUpdateIPSet struct { } func (*awsAwsjson11_deserializeOpUpdateIPSet) ID() string { return "OperationDeserializer" } func (m *awsAwsjson11_deserializeOpUpdateIPSet) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) if err != nil { return out, metadata, err } response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} } if response.StatusCode < 200 || response.StatusCode >= 300 { return out, metadata, awsAwsjson11_deserializeOpErrorUpdateIPSet(response, &metadata) } output := &UpdateIPSetOutput{} out.Result = output var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(response.Body, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } err = awsAwsjson11_deserializeOpDocumentUpdateIPSetOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } return out, metadata, err } func awsAwsjson11_deserializeOpErrorUpdateIPSet(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") if len(headerCode) != 0 { errorCode = restjson.SanitizeErrorCode(headerCode) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(headerCode) == 0 && len(jsonCode) != 0 { errorCode = restjson.SanitizeErrorCode(jsonCode) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("WAFInternalErrorException", errorCode): return awsAwsjson11_deserializeErrorWAFInternalErrorException(response, errorBody) case strings.EqualFold("WAFInvalidAccountException", errorCode): return awsAwsjson11_deserializeErrorWAFInvalidAccountException(response, errorBody) case strings.EqualFold("WAFInvalidOperationException", errorCode): return awsAwsjson11_deserializeErrorWAFInvalidOperationException(response, errorBody) case strings.EqualFold("WAFInvalidParameterException", errorCode): return awsAwsjson11_deserializeErrorWAFInvalidParameterException(response, errorBody) case strings.EqualFold("WAFLimitsExceededException", errorCode): return awsAwsjson11_deserializeErrorWAFLimitsExceededException(response, errorBody) case strings.EqualFold("WAFNonexistentContainerException", errorCode): return awsAwsjson11_deserializeErrorWAFNonexistentContainerException(response, errorBody) case strings.EqualFold("WAFNonexistentItemException", errorCode): return awsAwsjson11_deserializeErrorWAFNonexistentItemException(response, errorBody) case strings.EqualFold("WAFReferencedItemException", errorCode): return awsAwsjson11_deserializeErrorWAFReferencedItemException(response, errorBody) case strings.EqualFold("WAFStaleDataException", errorCode): return awsAwsjson11_deserializeErrorWAFStaleDataException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson11_deserializeOpUpdateRateBasedRule struct { } func (*awsAwsjson11_deserializeOpUpdateRateBasedRule) ID() string { return "OperationDeserializer" } func (m *awsAwsjson11_deserializeOpUpdateRateBasedRule) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) if err != nil { return out, metadata, err } response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} } if response.StatusCode < 200 || response.StatusCode >= 300 { return out, metadata, awsAwsjson11_deserializeOpErrorUpdateRateBasedRule(response, &metadata) } output := &UpdateRateBasedRuleOutput{} out.Result = output var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(response.Body, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } err = awsAwsjson11_deserializeOpDocumentUpdateRateBasedRuleOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } return out, metadata, err } func awsAwsjson11_deserializeOpErrorUpdateRateBasedRule(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") if len(headerCode) != 0 { errorCode = restjson.SanitizeErrorCode(headerCode) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(headerCode) == 0 && len(jsonCode) != 0 { errorCode = restjson.SanitizeErrorCode(jsonCode) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("WAFInternalErrorException", errorCode): return awsAwsjson11_deserializeErrorWAFInternalErrorException(response, errorBody) case strings.EqualFold("WAFInvalidAccountException", errorCode): return awsAwsjson11_deserializeErrorWAFInvalidAccountException(response, errorBody) case strings.EqualFold("WAFInvalidOperationException", errorCode): return awsAwsjson11_deserializeErrorWAFInvalidOperationException(response, errorBody) case strings.EqualFold("WAFInvalidParameterException", errorCode): return awsAwsjson11_deserializeErrorWAFInvalidParameterException(response, errorBody) case strings.EqualFold("WAFLimitsExceededException", errorCode): return awsAwsjson11_deserializeErrorWAFLimitsExceededException(response, errorBody) case strings.EqualFold("WAFNonexistentContainerException", errorCode): return awsAwsjson11_deserializeErrorWAFNonexistentContainerException(response, errorBody) case strings.EqualFold("WAFNonexistentItemException", errorCode): return awsAwsjson11_deserializeErrorWAFNonexistentItemException(response, errorBody) case strings.EqualFold("WAFReferencedItemException", errorCode): return awsAwsjson11_deserializeErrorWAFReferencedItemException(response, errorBody) case strings.EqualFold("WAFStaleDataException", errorCode): return awsAwsjson11_deserializeErrorWAFStaleDataException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson11_deserializeOpUpdateRegexMatchSet struct { } func (*awsAwsjson11_deserializeOpUpdateRegexMatchSet) ID() string { return "OperationDeserializer" } func (m *awsAwsjson11_deserializeOpUpdateRegexMatchSet) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) if err != nil { return out, metadata, err } response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} } if response.StatusCode < 200 || response.StatusCode >= 300 { return out, metadata, awsAwsjson11_deserializeOpErrorUpdateRegexMatchSet(response, &metadata) } output := &UpdateRegexMatchSetOutput{} out.Result = output var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(response.Body, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } err = awsAwsjson11_deserializeOpDocumentUpdateRegexMatchSetOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } return out, metadata, err } func awsAwsjson11_deserializeOpErrorUpdateRegexMatchSet(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") if len(headerCode) != 0 { errorCode = restjson.SanitizeErrorCode(headerCode) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(headerCode) == 0 && len(jsonCode) != 0 { errorCode = restjson.SanitizeErrorCode(jsonCode) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("WAFDisallowedNameException", errorCode): return awsAwsjson11_deserializeErrorWAFDisallowedNameException(response, errorBody) case strings.EqualFold("WAFInternalErrorException", errorCode): return awsAwsjson11_deserializeErrorWAFInternalErrorException(response, errorBody) case strings.EqualFold("WAFInvalidAccountException", errorCode): return awsAwsjson11_deserializeErrorWAFInvalidAccountException(response, errorBody) case strings.EqualFold("WAFInvalidOperationException", errorCode): return awsAwsjson11_deserializeErrorWAFInvalidOperationException(response, errorBody) case strings.EqualFold("WAFLimitsExceededException", errorCode): return awsAwsjson11_deserializeErrorWAFLimitsExceededException(response, errorBody) case strings.EqualFold("WAFNonexistentContainerException", errorCode): return awsAwsjson11_deserializeErrorWAFNonexistentContainerException(response, errorBody) case strings.EqualFold("WAFNonexistentItemException", errorCode): return awsAwsjson11_deserializeErrorWAFNonexistentItemException(response, errorBody) case strings.EqualFold("WAFStaleDataException", errorCode): return awsAwsjson11_deserializeErrorWAFStaleDataException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson11_deserializeOpUpdateRegexPatternSet struct { } func (*awsAwsjson11_deserializeOpUpdateRegexPatternSet) ID() string { return "OperationDeserializer" } func (m *awsAwsjson11_deserializeOpUpdateRegexPatternSet) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) if err != nil { return out, metadata, err } response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} } if response.StatusCode < 200 || response.StatusCode >= 300 { return out, metadata, awsAwsjson11_deserializeOpErrorUpdateRegexPatternSet(response, &metadata) } output := &UpdateRegexPatternSetOutput{} out.Result = output var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(response.Body, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } err = awsAwsjson11_deserializeOpDocumentUpdateRegexPatternSetOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } return out, metadata, err } func awsAwsjson11_deserializeOpErrorUpdateRegexPatternSet(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") if len(headerCode) != 0 { errorCode = restjson.SanitizeErrorCode(headerCode) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(headerCode) == 0 && len(jsonCode) != 0 { errorCode = restjson.SanitizeErrorCode(jsonCode) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("WAFInternalErrorException", errorCode): return awsAwsjson11_deserializeErrorWAFInternalErrorException(response, errorBody) case strings.EqualFold("WAFInvalidAccountException", errorCode): return awsAwsjson11_deserializeErrorWAFInvalidAccountException(response, errorBody) case strings.EqualFold("WAFInvalidOperationException", errorCode): return awsAwsjson11_deserializeErrorWAFInvalidOperationException(response, errorBody) case strings.EqualFold("WAFInvalidRegexPatternException", errorCode): return awsAwsjson11_deserializeErrorWAFInvalidRegexPatternException(response, errorBody) case strings.EqualFold("WAFLimitsExceededException", errorCode): return awsAwsjson11_deserializeErrorWAFLimitsExceededException(response, errorBody) case strings.EqualFold("WAFNonexistentContainerException", errorCode): return awsAwsjson11_deserializeErrorWAFNonexistentContainerException(response, errorBody) case strings.EqualFold("WAFNonexistentItemException", errorCode): return awsAwsjson11_deserializeErrorWAFNonexistentItemException(response, errorBody) case strings.EqualFold("WAFStaleDataException", errorCode): return awsAwsjson11_deserializeErrorWAFStaleDataException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson11_deserializeOpUpdateRule struct { } func (*awsAwsjson11_deserializeOpUpdateRule) ID() string { return "OperationDeserializer" } func (m *awsAwsjson11_deserializeOpUpdateRule) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) if err != nil { return out, metadata, err } response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} } if response.StatusCode < 200 || response.StatusCode >= 300 { return out, metadata, awsAwsjson11_deserializeOpErrorUpdateRule(response, &metadata) } output := &UpdateRuleOutput{} out.Result = output var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(response.Body, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } err = awsAwsjson11_deserializeOpDocumentUpdateRuleOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } return out, metadata, err } func awsAwsjson11_deserializeOpErrorUpdateRule(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") if len(headerCode) != 0 { errorCode = restjson.SanitizeErrorCode(headerCode) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(headerCode) == 0 && len(jsonCode) != 0 { errorCode = restjson.SanitizeErrorCode(jsonCode) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("WAFInternalErrorException", errorCode): return awsAwsjson11_deserializeErrorWAFInternalErrorException(response, errorBody) case strings.EqualFold("WAFInvalidAccountException", errorCode): return awsAwsjson11_deserializeErrorWAFInvalidAccountException(response, errorBody) case strings.EqualFold("WAFInvalidOperationException", errorCode): return awsAwsjson11_deserializeErrorWAFInvalidOperationException(response, errorBody) case strings.EqualFold("WAFInvalidParameterException", errorCode): return awsAwsjson11_deserializeErrorWAFInvalidParameterException(response, errorBody) case strings.EqualFold("WAFLimitsExceededException", errorCode): return awsAwsjson11_deserializeErrorWAFLimitsExceededException(response, errorBody) case strings.EqualFold("WAFNonexistentContainerException", errorCode): return awsAwsjson11_deserializeErrorWAFNonexistentContainerException(response, errorBody) case strings.EqualFold("WAFNonexistentItemException", errorCode): return awsAwsjson11_deserializeErrorWAFNonexistentItemException(response, errorBody) case strings.EqualFold("WAFReferencedItemException", errorCode): return awsAwsjson11_deserializeErrorWAFReferencedItemException(response, errorBody) case strings.EqualFold("WAFStaleDataException", errorCode): return awsAwsjson11_deserializeErrorWAFStaleDataException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson11_deserializeOpUpdateRuleGroup struct { } func (*awsAwsjson11_deserializeOpUpdateRuleGroup) ID() string { return "OperationDeserializer" } func (m *awsAwsjson11_deserializeOpUpdateRuleGroup) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) if err != nil { return out, metadata, err } response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} } if response.StatusCode < 200 || response.StatusCode >= 300 { return out, metadata, awsAwsjson11_deserializeOpErrorUpdateRuleGroup(response, &metadata) } output := &UpdateRuleGroupOutput{} out.Result = output var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(response.Body, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } err = awsAwsjson11_deserializeOpDocumentUpdateRuleGroupOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } return out, metadata, err } func awsAwsjson11_deserializeOpErrorUpdateRuleGroup(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") if len(headerCode) != 0 { errorCode = restjson.SanitizeErrorCode(headerCode) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(headerCode) == 0 && len(jsonCode) != 0 { errorCode = restjson.SanitizeErrorCode(jsonCode) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("WAFInternalErrorException", errorCode): return awsAwsjson11_deserializeErrorWAFInternalErrorException(response, errorBody) case strings.EqualFold("WAFInvalidOperationException", errorCode): return awsAwsjson11_deserializeErrorWAFInvalidOperationException(response, errorBody) case strings.EqualFold("WAFInvalidParameterException", errorCode): return awsAwsjson11_deserializeErrorWAFInvalidParameterException(response, errorBody) case strings.EqualFold("WAFLimitsExceededException", errorCode): return awsAwsjson11_deserializeErrorWAFLimitsExceededException(response, errorBody) case strings.EqualFold("WAFNonexistentContainerException", errorCode): return awsAwsjson11_deserializeErrorWAFNonexistentContainerException(response, errorBody) case strings.EqualFold("WAFNonexistentItemException", errorCode): return awsAwsjson11_deserializeErrorWAFNonexistentItemException(response, errorBody) case strings.EqualFold("WAFStaleDataException", errorCode): return awsAwsjson11_deserializeErrorWAFStaleDataException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson11_deserializeOpUpdateSizeConstraintSet struct { } func (*awsAwsjson11_deserializeOpUpdateSizeConstraintSet) ID() string { return "OperationDeserializer" } func (m *awsAwsjson11_deserializeOpUpdateSizeConstraintSet) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) if err != nil { return out, metadata, err } response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} } if response.StatusCode < 200 || response.StatusCode >= 300 { return out, metadata, awsAwsjson11_deserializeOpErrorUpdateSizeConstraintSet(response, &metadata) } output := &UpdateSizeConstraintSetOutput{} out.Result = output var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(response.Body, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } err = awsAwsjson11_deserializeOpDocumentUpdateSizeConstraintSetOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } return out, metadata, err } func awsAwsjson11_deserializeOpErrorUpdateSizeConstraintSet(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") if len(headerCode) != 0 { errorCode = restjson.SanitizeErrorCode(headerCode) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(headerCode) == 0 && len(jsonCode) != 0 { errorCode = restjson.SanitizeErrorCode(jsonCode) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("WAFInternalErrorException", errorCode): return awsAwsjson11_deserializeErrorWAFInternalErrorException(response, errorBody) case strings.EqualFold("WAFInvalidAccountException", errorCode): return awsAwsjson11_deserializeErrorWAFInvalidAccountException(response, errorBody) case strings.EqualFold("WAFInvalidOperationException", errorCode): return awsAwsjson11_deserializeErrorWAFInvalidOperationException(response, errorBody) case strings.EqualFold("WAFInvalidParameterException", errorCode): return awsAwsjson11_deserializeErrorWAFInvalidParameterException(response, errorBody) case strings.EqualFold("WAFLimitsExceededException", errorCode): return awsAwsjson11_deserializeErrorWAFLimitsExceededException(response, errorBody) case strings.EqualFold("WAFNonexistentContainerException", errorCode): return awsAwsjson11_deserializeErrorWAFNonexistentContainerException(response, errorBody) case strings.EqualFold("WAFNonexistentItemException", errorCode): return awsAwsjson11_deserializeErrorWAFNonexistentItemException(response, errorBody) case strings.EqualFold("WAFReferencedItemException", errorCode): return awsAwsjson11_deserializeErrorWAFReferencedItemException(response, errorBody) case strings.EqualFold("WAFStaleDataException", errorCode): return awsAwsjson11_deserializeErrorWAFStaleDataException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson11_deserializeOpUpdateSqlInjectionMatchSet struct { } func (*awsAwsjson11_deserializeOpUpdateSqlInjectionMatchSet) ID() string { return "OperationDeserializer" } func (m *awsAwsjson11_deserializeOpUpdateSqlInjectionMatchSet) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) if err != nil { return out, metadata, err } response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} } if response.StatusCode < 200 || response.StatusCode >= 300 { return out, metadata, awsAwsjson11_deserializeOpErrorUpdateSqlInjectionMatchSet(response, &metadata) } output := &UpdateSqlInjectionMatchSetOutput{} out.Result = output var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(response.Body, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } err = awsAwsjson11_deserializeOpDocumentUpdateSqlInjectionMatchSetOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } return out, metadata, err } func awsAwsjson11_deserializeOpErrorUpdateSqlInjectionMatchSet(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") if len(headerCode) != 0 { errorCode = restjson.SanitizeErrorCode(headerCode) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(headerCode) == 0 && len(jsonCode) != 0 { errorCode = restjson.SanitizeErrorCode(jsonCode) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("WAFInternalErrorException", errorCode): return awsAwsjson11_deserializeErrorWAFInternalErrorException(response, errorBody) case strings.EqualFold("WAFInvalidAccountException", errorCode): return awsAwsjson11_deserializeErrorWAFInvalidAccountException(response, errorBody) case strings.EqualFold("WAFInvalidOperationException", errorCode): return awsAwsjson11_deserializeErrorWAFInvalidOperationException(response, errorBody) case strings.EqualFold("WAFInvalidParameterException", errorCode): return awsAwsjson11_deserializeErrorWAFInvalidParameterException(response, errorBody) case strings.EqualFold("WAFLimitsExceededException", errorCode): return awsAwsjson11_deserializeErrorWAFLimitsExceededException(response, errorBody) case strings.EqualFold("WAFNonexistentContainerException", errorCode): return awsAwsjson11_deserializeErrorWAFNonexistentContainerException(response, errorBody) case strings.EqualFold("WAFNonexistentItemException", errorCode): return awsAwsjson11_deserializeErrorWAFNonexistentItemException(response, errorBody) case strings.EqualFold("WAFStaleDataException", errorCode): return awsAwsjson11_deserializeErrorWAFStaleDataException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson11_deserializeOpUpdateWebACL struct { } func (*awsAwsjson11_deserializeOpUpdateWebACL) ID() string { return "OperationDeserializer" } func (m *awsAwsjson11_deserializeOpUpdateWebACL) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) if err != nil { return out, metadata, err } response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} } if response.StatusCode < 200 || response.StatusCode >= 300 { return out, metadata, awsAwsjson11_deserializeOpErrorUpdateWebACL(response, &metadata) } output := &UpdateWebACLOutput{} out.Result = output var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(response.Body, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } err = awsAwsjson11_deserializeOpDocumentUpdateWebACLOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } return out, metadata, err } func awsAwsjson11_deserializeOpErrorUpdateWebACL(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") if len(headerCode) != 0 { errorCode = restjson.SanitizeErrorCode(headerCode) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(headerCode) == 0 && len(jsonCode) != 0 { errorCode = restjson.SanitizeErrorCode(jsonCode) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("WAFInternalErrorException", errorCode): return awsAwsjson11_deserializeErrorWAFInternalErrorException(response, errorBody) case strings.EqualFold("WAFInvalidAccountException", errorCode): return awsAwsjson11_deserializeErrorWAFInvalidAccountException(response, errorBody) case strings.EqualFold("WAFInvalidOperationException", errorCode): return awsAwsjson11_deserializeErrorWAFInvalidOperationException(response, errorBody) case strings.EqualFold("WAFInvalidParameterException", errorCode): return awsAwsjson11_deserializeErrorWAFInvalidParameterException(response, errorBody) case strings.EqualFold("WAFLimitsExceededException", errorCode): return awsAwsjson11_deserializeErrorWAFLimitsExceededException(response, errorBody) case strings.EqualFold("WAFNonexistentContainerException", errorCode): return awsAwsjson11_deserializeErrorWAFNonexistentContainerException(response, errorBody) case strings.EqualFold("WAFNonexistentItemException", errorCode): return awsAwsjson11_deserializeErrorWAFNonexistentItemException(response, errorBody) case strings.EqualFold("WAFReferencedItemException", errorCode): return awsAwsjson11_deserializeErrorWAFReferencedItemException(response, errorBody) case strings.EqualFold("WAFStaleDataException", errorCode): return awsAwsjson11_deserializeErrorWAFStaleDataException(response, errorBody) case strings.EqualFold("WAFSubscriptionNotFoundException", errorCode): return awsAwsjson11_deserializeErrorWAFSubscriptionNotFoundException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson11_deserializeOpUpdateXssMatchSet struct { } func (*awsAwsjson11_deserializeOpUpdateXssMatchSet) ID() string { return "OperationDeserializer" } func (m *awsAwsjson11_deserializeOpUpdateXssMatchSet) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) if err != nil { return out, metadata, err } response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} } if response.StatusCode < 200 || response.StatusCode >= 300 { return out, metadata, awsAwsjson11_deserializeOpErrorUpdateXssMatchSet(response, &metadata) } output := &UpdateXssMatchSetOutput{} out.Result = output var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(response.Body, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } err = awsAwsjson11_deserializeOpDocumentUpdateXssMatchSetOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } return out, metadata, err } func awsAwsjson11_deserializeOpErrorUpdateXssMatchSet(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") if len(headerCode) != 0 { errorCode = restjson.SanitizeErrorCode(headerCode) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(headerCode) == 0 && len(jsonCode) != 0 { errorCode = restjson.SanitizeErrorCode(jsonCode) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("WAFInternalErrorException", errorCode): return awsAwsjson11_deserializeErrorWAFInternalErrorException(response, errorBody) case strings.EqualFold("WAFInvalidAccountException", errorCode): return awsAwsjson11_deserializeErrorWAFInvalidAccountException(response, errorBody) case strings.EqualFold("WAFInvalidOperationException", errorCode): return awsAwsjson11_deserializeErrorWAFInvalidOperationException(response, errorBody) case strings.EqualFold("WAFInvalidParameterException", errorCode): return awsAwsjson11_deserializeErrorWAFInvalidParameterException(response, errorBody) case strings.EqualFold("WAFLimitsExceededException", errorCode): return awsAwsjson11_deserializeErrorWAFLimitsExceededException(response, errorBody) case strings.EqualFold("WAFNonexistentContainerException", errorCode): return awsAwsjson11_deserializeErrorWAFNonexistentContainerException(response, errorBody) case strings.EqualFold("WAFNonexistentItemException", errorCode): return awsAwsjson11_deserializeErrorWAFNonexistentItemException(response, errorBody) case strings.EqualFold("WAFStaleDataException", errorCode): return awsAwsjson11_deserializeErrorWAFStaleDataException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } func awsAwsjson11_deserializeErrorWAFBadRequestException(response *smithyhttp.Response, errorBody *bytes.Reader) error { var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } output := &types.WAFBadRequestException{} err := awsAwsjson11_deserializeDocumentWAFBadRequestException(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) return output } func awsAwsjson11_deserializeErrorWAFDisallowedNameException(response *smithyhttp.Response, errorBody *bytes.Reader) error { var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } output := &types.WAFDisallowedNameException{} err := awsAwsjson11_deserializeDocumentWAFDisallowedNameException(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) return output } func awsAwsjson11_deserializeErrorWAFEntityMigrationException(response *smithyhttp.Response, errorBody *bytes.Reader) error { var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } output := &types.WAFEntityMigrationException{} err := awsAwsjson11_deserializeDocumentWAFEntityMigrationException(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) return output } func awsAwsjson11_deserializeErrorWAFInternalErrorException(response *smithyhttp.Response, errorBody *bytes.Reader) error { var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } output := &types.WAFInternalErrorException{} err := awsAwsjson11_deserializeDocumentWAFInternalErrorException(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) return output } func awsAwsjson11_deserializeErrorWAFInvalidAccountException(response *smithyhttp.Response, errorBody *bytes.Reader) error { var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } output := &types.WAFInvalidAccountException{} err := awsAwsjson11_deserializeDocumentWAFInvalidAccountException(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) return output } func awsAwsjson11_deserializeErrorWAFInvalidOperationException(response *smithyhttp.Response, errorBody *bytes.Reader) error { var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } output := &types.WAFInvalidOperationException{} err := awsAwsjson11_deserializeDocumentWAFInvalidOperationException(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) return output } func awsAwsjson11_deserializeErrorWAFInvalidParameterException(response *smithyhttp.Response, errorBody *bytes.Reader) error { var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } output := &types.WAFInvalidParameterException{} err := awsAwsjson11_deserializeDocumentWAFInvalidParameterException(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) return output } func awsAwsjson11_deserializeErrorWAFInvalidPermissionPolicyException(response *smithyhttp.Response, errorBody *bytes.Reader) error { var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } output := &types.WAFInvalidPermissionPolicyException{} err := awsAwsjson11_deserializeDocumentWAFInvalidPermissionPolicyException(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) return output } func awsAwsjson11_deserializeErrorWAFInvalidRegexPatternException(response *smithyhttp.Response, errorBody *bytes.Reader) error { var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } output := &types.WAFInvalidRegexPatternException{} err := awsAwsjson11_deserializeDocumentWAFInvalidRegexPatternException(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) return output } func awsAwsjson11_deserializeErrorWAFLimitsExceededException(response *smithyhttp.Response, errorBody *bytes.Reader) error { var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } output := &types.WAFLimitsExceededException{} err := awsAwsjson11_deserializeDocumentWAFLimitsExceededException(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) return output } func awsAwsjson11_deserializeErrorWAFNonEmptyEntityException(response *smithyhttp.Response, errorBody *bytes.Reader) error { var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } output := &types.WAFNonEmptyEntityException{} err := awsAwsjson11_deserializeDocumentWAFNonEmptyEntityException(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) return output } func awsAwsjson11_deserializeErrorWAFNonexistentContainerException(response *smithyhttp.Response, errorBody *bytes.Reader) error { var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } output := &types.WAFNonexistentContainerException{} err := awsAwsjson11_deserializeDocumentWAFNonexistentContainerException(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) return output } func awsAwsjson11_deserializeErrorWAFNonexistentItemException(response *smithyhttp.Response, errorBody *bytes.Reader) error { var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } output := &types.WAFNonexistentItemException{} err := awsAwsjson11_deserializeDocumentWAFNonexistentItemException(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) return output } func awsAwsjson11_deserializeErrorWAFReferencedItemException(response *smithyhttp.Response, errorBody *bytes.Reader) error { var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } output := &types.WAFReferencedItemException{} err := awsAwsjson11_deserializeDocumentWAFReferencedItemException(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) return output } func awsAwsjson11_deserializeErrorWAFServiceLinkedRoleErrorException(response *smithyhttp.Response, errorBody *bytes.Reader) error { var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } output := &types.WAFServiceLinkedRoleErrorException{} err := awsAwsjson11_deserializeDocumentWAFServiceLinkedRoleErrorException(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) return output } func awsAwsjson11_deserializeErrorWAFStaleDataException(response *smithyhttp.Response, errorBody *bytes.Reader) error { var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } output := &types.WAFStaleDataException{} err := awsAwsjson11_deserializeDocumentWAFStaleDataException(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) return output } func awsAwsjson11_deserializeErrorWAFSubscriptionNotFoundException(response *smithyhttp.Response, errorBody *bytes.Reader) error { var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } output := &types.WAFSubscriptionNotFoundException{} err := awsAwsjson11_deserializeDocumentWAFSubscriptionNotFoundException(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) return output } func awsAwsjson11_deserializeErrorWAFTagOperationException(response *smithyhttp.Response, errorBody *bytes.Reader) error { var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } output := &types.WAFTagOperationException{} err := awsAwsjson11_deserializeDocumentWAFTagOperationException(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) return output } func awsAwsjson11_deserializeErrorWAFTagOperationInternalErrorException(response *smithyhttp.Response, errorBody *bytes.Reader) error { var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } output := &types.WAFTagOperationInternalErrorException{} err := awsAwsjson11_deserializeDocumentWAFTagOperationInternalErrorException(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) return output } func awsAwsjson11_deserializeDocumentActivatedRule(v **types.ActivatedRule, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.ActivatedRule if *v == nil { sv = &types.ActivatedRule{} } else { sv = *v } for key, value := range shape { switch key { case "Action": if err := awsAwsjson11_deserializeDocumentWafAction(&sv.Action, value); err != nil { return err } case "ExcludedRules": if err := awsAwsjson11_deserializeDocumentExcludedRules(&sv.ExcludedRules, value); err != nil { return err } case "OverrideAction": if err := awsAwsjson11_deserializeDocumentWafOverrideAction(&sv.OverrideAction, value); err != nil { return err } case "Priority": if value != nil { jtv, ok := value.(json.Number) if !ok { return fmt.Errorf("expected RulePriority to be json.Number, got %T instead", value) } i64, err := jtv.Int64() if err != nil { return err } sv.Priority = ptr.Int32(int32(i64)) } case "RuleId": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ResourceId to be of type string, got %T instead", value) } sv.RuleId = ptr.String(jtv) } case "Type": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected WafRuleType to be of type string, got %T instead", value) } sv.Type = types.WafRuleType(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentActivatedRules(v *[]types.ActivatedRule, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.([]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var cv []types.ActivatedRule if *v == nil { cv = []types.ActivatedRule{} } else { cv = *v } for _, value := range shape { var col types.ActivatedRule destAddr := &col if err := awsAwsjson11_deserializeDocumentActivatedRule(&destAddr, value); err != nil { return err } col = *destAddr cv = append(cv, col) } *v = cv return nil } func awsAwsjson11_deserializeDocumentByteMatchSet(v **types.ByteMatchSet, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.ByteMatchSet if *v == nil { sv = &types.ByteMatchSet{} } else { sv = *v } for key, value := range shape { switch key { case "ByteMatchSetId": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ResourceId to be of type string, got %T instead", value) } sv.ByteMatchSetId = ptr.String(jtv) } case "ByteMatchTuples": if err := awsAwsjson11_deserializeDocumentByteMatchTuples(&sv.ByteMatchTuples, value); err != nil { return err } case "Name": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ResourceName to be of type string, got %T instead", value) } sv.Name = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentByteMatchSetSummaries(v *[]types.ByteMatchSetSummary, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.([]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var cv []types.ByteMatchSetSummary if *v == nil { cv = []types.ByteMatchSetSummary{} } else { cv = *v } for _, value := range shape { var col types.ByteMatchSetSummary destAddr := &col if err := awsAwsjson11_deserializeDocumentByteMatchSetSummary(&destAddr, value); err != nil { return err } col = *destAddr cv = append(cv, col) } *v = cv return nil } func awsAwsjson11_deserializeDocumentByteMatchSetSummary(v **types.ByteMatchSetSummary, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.ByteMatchSetSummary if *v == nil { sv = &types.ByteMatchSetSummary{} } else { sv = *v } for key, value := range shape { switch key { case "ByteMatchSetId": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ResourceId to be of type string, got %T instead", value) } sv.ByteMatchSetId = ptr.String(jtv) } case "Name": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ResourceName to be of type string, got %T instead", value) } sv.Name = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentByteMatchTuple(v **types.ByteMatchTuple, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.ByteMatchTuple if *v == nil { sv = &types.ByteMatchTuple{} } else { sv = *v } for key, value := range shape { switch key { case "FieldToMatch": if err := awsAwsjson11_deserializeDocumentFieldToMatch(&sv.FieldToMatch, value); err != nil { return err } case "PositionalConstraint": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected PositionalConstraint to be of type string, got %T instead", value) } sv.PositionalConstraint = types.PositionalConstraint(jtv) } case "TargetString": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ByteMatchTargetString to be []byte, got %T instead", value) } dv, err := base64.StdEncoding.DecodeString(jtv) if err != nil { return fmt.Errorf("failed to base64 decode ByteMatchTargetString, %w", err) } sv.TargetString = dv } case "TextTransformation": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected TextTransformation to be of type string, got %T instead", value) } sv.TextTransformation = types.TextTransformation(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentByteMatchTuples(v *[]types.ByteMatchTuple, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.([]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var cv []types.ByteMatchTuple if *v == nil { cv = []types.ByteMatchTuple{} } else { cv = *v } for _, value := range shape { var col types.ByteMatchTuple destAddr := &col if err := awsAwsjson11_deserializeDocumentByteMatchTuple(&destAddr, value); err != nil { return err } col = *destAddr cv = append(cv, col) } *v = cv return nil } func awsAwsjson11_deserializeDocumentExcludedRule(v **types.ExcludedRule, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.ExcludedRule if *v == nil { sv = &types.ExcludedRule{} } else { sv = *v } for key, value := range shape { switch key { case "RuleId": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ResourceId to be of type string, got %T instead", value) } sv.RuleId = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentExcludedRules(v *[]types.ExcludedRule, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.([]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var cv []types.ExcludedRule if *v == nil { cv = []types.ExcludedRule{} } else { cv = *v } for _, value := range shape { var col types.ExcludedRule destAddr := &col if err := awsAwsjson11_deserializeDocumentExcludedRule(&destAddr, value); err != nil { return err } col = *destAddr cv = append(cv, col) } *v = cv return nil } func awsAwsjson11_deserializeDocumentFieldToMatch(v **types.FieldToMatch, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.FieldToMatch if *v == nil { sv = &types.FieldToMatch{} } else { sv = *v } for key, value := range shape { switch key { case "Data": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected MatchFieldData to be of type string, got %T instead", value) } sv.Data = ptr.String(jtv) } case "Type": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected MatchFieldType to be of type string, got %T instead", value) } sv.Type = types.MatchFieldType(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentGeoMatchConstraint(v **types.GeoMatchConstraint, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.GeoMatchConstraint if *v == nil { sv = &types.GeoMatchConstraint{} } else { sv = *v } for key, value := range shape { switch key { case "Type": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected GeoMatchConstraintType to be of type string, got %T instead", value) } sv.Type = types.GeoMatchConstraintType(jtv) } case "Value": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected GeoMatchConstraintValue to be of type string, got %T instead", value) } sv.Value = types.GeoMatchConstraintValue(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentGeoMatchConstraints(v *[]types.GeoMatchConstraint, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.([]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var cv []types.GeoMatchConstraint if *v == nil { cv = []types.GeoMatchConstraint{} } else { cv = *v } for _, value := range shape { var col types.GeoMatchConstraint destAddr := &col if err := awsAwsjson11_deserializeDocumentGeoMatchConstraint(&destAddr, value); err != nil { return err } col = *destAddr cv = append(cv, col) } *v = cv return nil } func awsAwsjson11_deserializeDocumentGeoMatchSet(v **types.GeoMatchSet, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.GeoMatchSet if *v == nil { sv = &types.GeoMatchSet{} } else { sv = *v } for key, value := range shape { switch key { case "GeoMatchConstraints": if err := awsAwsjson11_deserializeDocumentGeoMatchConstraints(&sv.GeoMatchConstraints, value); err != nil { return err } case "GeoMatchSetId": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ResourceId to be of type string, got %T instead", value) } sv.GeoMatchSetId = ptr.String(jtv) } case "Name": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ResourceName to be of type string, got %T instead", value) } sv.Name = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentGeoMatchSetSummaries(v *[]types.GeoMatchSetSummary, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.([]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var cv []types.GeoMatchSetSummary if *v == nil { cv = []types.GeoMatchSetSummary{} } else { cv = *v } for _, value := range shape { var col types.GeoMatchSetSummary destAddr := &col if err := awsAwsjson11_deserializeDocumentGeoMatchSetSummary(&destAddr, value); err != nil { return err } col = *destAddr cv = append(cv, col) } *v = cv return nil } func awsAwsjson11_deserializeDocumentGeoMatchSetSummary(v **types.GeoMatchSetSummary, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.GeoMatchSetSummary if *v == nil { sv = &types.GeoMatchSetSummary{} } else { sv = *v } for key, value := range shape { switch key { case "GeoMatchSetId": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ResourceId to be of type string, got %T instead", value) } sv.GeoMatchSetId = ptr.String(jtv) } case "Name": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ResourceName to be of type string, got %T instead", value) } sv.Name = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentHTTPHeader(v **types.HTTPHeader, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.HTTPHeader if *v == nil { sv = &types.HTTPHeader{} } else { sv = *v } for key, value := range shape { switch key { case "Name": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected HeaderName to be of type string, got %T instead", value) } sv.Name = ptr.String(jtv) } case "Value": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected HeaderValue to be of type string, got %T instead", value) } sv.Value = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentHTTPHeaders(v *[]types.HTTPHeader, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.([]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var cv []types.HTTPHeader if *v == nil { cv = []types.HTTPHeader{} } else { cv = *v } for _, value := range shape { var col types.HTTPHeader destAddr := &col if err := awsAwsjson11_deserializeDocumentHTTPHeader(&destAddr, value); err != nil { return err } col = *destAddr cv = append(cv, col) } *v = cv return nil } func awsAwsjson11_deserializeDocumentHTTPRequest(v **types.HTTPRequest, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.HTTPRequest if *v == nil { sv = &types.HTTPRequest{} } else { sv = *v } for key, value := range shape { switch key { case "ClientIP": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected IPString to be of type string, got %T instead", value) } sv.ClientIP = ptr.String(jtv) } case "Country": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected Country to be of type string, got %T instead", value) } sv.Country = ptr.String(jtv) } case "Headers": if err := awsAwsjson11_deserializeDocumentHTTPHeaders(&sv.Headers, value); err != nil { return err } case "HTTPVersion": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected HTTPVersion to be of type string, got %T instead", value) } sv.HTTPVersion = ptr.String(jtv) } case "Method": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected HTTPMethod to be of type string, got %T instead", value) } sv.Method = ptr.String(jtv) } case "URI": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected URIString to be of type string, got %T instead", value) } sv.URI = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentIPSet(v **types.IPSet, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.IPSet if *v == nil { sv = &types.IPSet{} } else { sv = *v } for key, value := range shape { switch key { case "IPSetDescriptors": if err := awsAwsjson11_deserializeDocumentIPSetDescriptors(&sv.IPSetDescriptors, value); err != nil { return err } case "IPSetId": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ResourceId to be of type string, got %T instead", value) } sv.IPSetId = ptr.String(jtv) } case "Name": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ResourceName to be of type string, got %T instead", value) } sv.Name = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentIPSetDescriptor(v **types.IPSetDescriptor, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.IPSetDescriptor if *v == nil { sv = &types.IPSetDescriptor{} } else { sv = *v } for key, value := range shape { switch key { case "Type": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected IPSetDescriptorType to be of type string, got %T instead", value) } sv.Type = types.IPSetDescriptorType(jtv) } case "Value": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected IPSetDescriptorValue to be of type string, got %T instead", value) } sv.Value = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentIPSetDescriptors(v *[]types.IPSetDescriptor, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.([]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var cv []types.IPSetDescriptor if *v == nil { cv = []types.IPSetDescriptor{} } else { cv = *v } for _, value := range shape { var col types.IPSetDescriptor destAddr := &col if err := awsAwsjson11_deserializeDocumentIPSetDescriptor(&destAddr, value); err != nil { return err } col = *destAddr cv = append(cv, col) } *v = cv return nil } func awsAwsjson11_deserializeDocumentIPSetSummaries(v *[]types.IPSetSummary, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.([]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var cv []types.IPSetSummary if *v == nil { cv = []types.IPSetSummary{} } else { cv = *v } for _, value := range shape { var col types.IPSetSummary destAddr := &col if err := awsAwsjson11_deserializeDocumentIPSetSummary(&destAddr, value); err != nil { return err } col = *destAddr cv = append(cv, col) } *v = cv return nil } func awsAwsjson11_deserializeDocumentIPSetSummary(v **types.IPSetSummary, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.IPSetSummary if *v == nil { sv = &types.IPSetSummary{} } else { sv = *v } for key, value := range shape { switch key { case "IPSetId": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ResourceId to be of type string, got %T instead", value) } sv.IPSetId = ptr.String(jtv) } case "Name": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ResourceName to be of type string, got %T instead", value) } sv.Name = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentLogDestinationConfigs(v *[]string, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.([]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var cv []string if *v == nil { cv = []string{} } else { cv = *v } for _, value := range shape { var col string if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ResourceArn to be of type string, got %T instead", value) } col = jtv } cv = append(cv, col) } *v = cv return nil } func awsAwsjson11_deserializeDocumentLoggingConfiguration(v **types.LoggingConfiguration, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.LoggingConfiguration if *v == nil { sv = &types.LoggingConfiguration{} } else { sv = *v } for key, value := range shape { switch key { case "LogDestinationConfigs": if err := awsAwsjson11_deserializeDocumentLogDestinationConfigs(&sv.LogDestinationConfigs, value); err != nil { return err } case "RedactedFields": if err := awsAwsjson11_deserializeDocumentRedactedFields(&sv.RedactedFields, value); err != nil { return err } case "ResourceArn": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ResourceArn to be of type string, got %T instead", value) } sv.ResourceArn = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentLoggingConfigurations(v *[]types.LoggingConfiguration, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.([]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var cv []types.LoggingConfiguration if *v == nil { cv = []types.LoggingConfiguration{} } else { cv = *v } for _, value := range shape { var col types.LoggingConfiguration destAddr := &col if err := awsAwsjson11_deserializeDocumentLoggingConfiguration(&destAddr, value); err != nil { return err } col = *destAddr cv = append(cv, col) } *v = cv return nil } func awsAwsjson11_deserializeDocumentManagedKeys(v *[]string, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.([]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var cv []string if *v == nil { cv = []string{} } else { cv = *v } for _, value := range shape { var col string if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ManagedKey to be of type string, got %T instead", value) } col = jtv } cv = append(cv, col) } *v = cv return nil } func awsAwsjson11_deserializeDocumentPredicate(v **types.Predicate, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.Predicate if *v == nil { sv = &types.Predicate{} } else { sv = *v } for key, value := range shape { switch key { case "DataId": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ResourceId to be of type string, got %T instead", value) } sv.DataId = ptr.String(jtv) } case "Negated": if value != nil { jtv, ok := value.(bool) if !ok { return fmt.Errorf("expected Negated to be of type *bool, got %T instead", value) } sv.Negated = ptr.Bool(jtv) } case "Type": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected PredicateType to be of type string, got %T instead", value) } sv.Type = types.PredicateType(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentPredicates(v *[]types.Predicate, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.([]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var cv []types.Predicate if *v == nil { cv = []types.Predicate{} } else { cv = *v } for _, value := range shape { var col types.Predicate destAddr := &col if err := awsAwsjson11_deserializeDocumentPredicate(&destAddr, value); err != nil { return err } col = *destAddr cv = append(cv, col) } *v = cv return nil } func awsAwsjson11_deserializeDocumentRateBasedRule(v **types.RateBasedRule, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.RateBasedRule if *v == nil { sv = &types.RateBasedRule{} } else { sv = *v } for key, value := range shape { switch key { case "MatchPredicates": if err := awsAwsjson11_deserializeDocumentPredicates(&sv.MatchPredicates, value); err != nil { return err } case "MetricName": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected MetricName to be of type string, got %T instead", value) } sv.MetricName = ptr.String(jtv) } case "Name": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ResourceName to be of type string, got %T instead", value) } sv.Name = ptr.String(jtv) } case "RateKey": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected RateKey to be of type string, got %T instead", value) } sv.RateKey = types.RateKey(jtv) } case "RateLimit": if value != nil { jtv, ok := value.(json.Number) if !ok { return fmt.Errorf("expected RateLimit to be json.Number, got %T instead", value) } i64, err := jtv.Int64() if err != nil { return err } sv.RateLimit = i64 } case "RuleId": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ResourceId to be of type string, got %T instead", value) } sv.RuleId = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentRedactedFields(v *[]types.FieldToMatch, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.([]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var cv []types.FieldToMatch if *v == nil { cv = []types.FieldToMatch{} } else { cv = *v } for _, value := range shape { var col types.FieldToMatch destAddr := &col if err := awsAwsjson11_deserializeDocumentFieldToMatch(&destAddr, value); err != nil { return err } col = *destAddr cv = append(cv, col) } *v = cv return nil } func awsAwsjson11_deserializeDocumentRegexMatchSet(v **types.RegexMatchSet, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.RegexMatchSet if *v == nil { sv = &types.RegexMatchSet{} } else { sv = *v } for key, value := range shape { switch key { case "Name": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ResourceName to be of type string, got %T instead", value) } sv.Name = ptr.String(jtv) } case "RegexMatchSetId": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ResourceId to be of type string, got %T instead", value) } sv.RegexMatchSetId = ptr.String(jtv) } case "RegexMatchTuples": if err := awsAwsjson11_deserializeDocumentRegexMatchTuples(&sv.RegexMatchTuples, value); err != nil { return err } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentRegexMatchSetSummaries(v *[]types.RegexMatchSetSummary, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.([]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var cv []types.RegexMatchSetSummary if *v == nil { cv = []types.RegexMatchSetSummary{} } else { cv = *v } for _, value := range shape { var col types.RegexMatchSetSummary destAddr := &col if err := awsAwsjson11_deserializeDocumentRegexMatchSetSummary(&destAddr, value); err != nil { return err } col = *destAddr cv = append(cv, col) } *v = cv return nil } func awsAwsjson11_deserializeDocumentRegexMatchSetSummary(v **types.RegexMatchSetSummary, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.RegexMatchSetSummary if *v == nil { sv = &types.RegexMatchSetSummary{} } else { sv = *v } for key, value := range shape { switch key { case "Name": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ResourceName to be of type string, got %T instead", value) } sv.Name = ptr.String(jtv) } case "RegexMatchSetId": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ResourceId to be of type string, got %T instead", value) } sv.RegexMatchSetId = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentRegexMatchTuple(v **types.RegexMatchTuple, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.RegexMatchTuple if *v == nil { sv = &types.RegexMatchTuple{} } else { sv = *v } for key, value := range shape { switch key { case "FieldToMatch": if err := awsAwsjson11_deserializeDocumentFieldToMatch(&sv.FieldToMatch, value); err != nil { return err } case "RegexPatternSetId": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ResourceId to be of type string, got %T instead", value) } sv.RegexPatternSetId = ptr.String(jtv) } case "TextTransformation": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected TextTransformation to be of type string, got %T instead", value) } sv.TextTransformation = types.TextTransformation(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentRegexMatchTuples(v *[]types.RegexMatchTuple, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.([]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var cv []types.RegexMatchTuple if *v == nil { cv = []types.RegexMatchTuple{} } else { cv = *v } for _, value := range shape { var col types.RegexMatchTuple destAddr := &col if err := awsAwsjson11_deserializeDocumentRegexMatchTuple(&destAddr, value); err != nil { return err } col = *destAddr cv = append(cv, col) } *v = cv return nil } func awsAwsjson11_deserializeDocumentRegexPatternSet(v **types.RegexPatternSet, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.RegexPatternSet if *v == nil { sv = &types.RegexPatternSet{} } else { sv = *v } for key, value := range shape { switch key { case "Name": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ResourceName to be of type string, got %T instead", value) } sv.Name = ptr.String(jtv) } case "RegexPatternSetId": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ResourceId to be of type string, got %T instead", value) } sv.RegexPatternSetId = ptr.String(jtv) } case "RegexPatternStrings": if err := awsAwsjson11_deserializeDocumentRegexPatternStrings(&sv.RegexPatternStrings, value); err != nil { return err } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentRegexPatternSetSummaries(v *[]types.RegexPatternSetSummary, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.([]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var cv []types.RegexPatternSetSummary if *v == nil { cv = []types.RegexPatternSetSummary{} } else { cv = *v } for _, value := range shape { var col types.RegexPatternSetSummary destAddr := &col if err := awsAwsjson11_deserializeDocumentRegexPatternSetSummary(&destAddr, value); err != nil { return err } col = *destAddr cv = append(cv, col) } *v = cv return nil } func awsAwsjson11_deserializeDocumentRegexPatternSetSummary(v **types.RegexPatternSetSummary, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.RegexPatternSetSummary if *v == nil { sv = &types.RegexPatternSetSummary{} } else { sv = *v } for key, value := range shape { switch key { case "Name": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ResourceName to be of type string, got %T instead", value) } sv.Name = ptr.String(jtv) } case "RegexPatternSetId": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ResourceId to be of type string, got %T instead", value) } sv.RegexPatternSetId = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentRegexPatternStrings(v *[]string, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.([]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var cv []string if *v == nil { cv = []string{} } else { cv = *v } for _, value := range shape { var col string if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected RegexPatternString to be of type string, got %T instead", value) } col = jtv } cv = append(cv, col) } *v = cv return nil } func awsAwsjson11_deserializeDocumentRule(v **types.Rule, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.Rule if *v == nil { sv = &types.Rule{} } else { sv = *v } for key, value := range shape { switch key { case "MetricName": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected MetricName to be of type string, got %T instead", value) } sv.MetricName = ptr.String(jtv) } case "Name": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ResourceName to be of type string, got %T instead", value) } sv.Name = ptr.String(jtv) } case "Predicates": if err := awsAwsjson11_deserializeDocumentPredicates(&sv.Predicates, value); err != nil { return err } case "RuleId": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ResourceId to be of type string, got %T instead", value) } sv.RuleId = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentRuleGroup(v **types.RuleGroup, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.RuleGroup if *v == nil { sv = &types.RuleGroup{} } else { sv = *v } for key, value := range shape { switch key { case "MetricName": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected MetricName to be of type string, got %T instead", value) } sv.MetricName = ptr.String(jtv) } case "Name": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ResourceName to be of type string, got %T instead", value) } sv.Name = ptr.String(jtv) } case "RuleGroupId": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ResourceId to be of type string, got %T instead", value) } sv.RuleGroupId = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentRuleGroupSummaries(v *[]types.RuleGroupSummary, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.([]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var cv []types.RuleGroupSummary if *v == nil { cv = []types.RuleGroupSummary{} } else { cv = *v } for _, value := range shape { var col types.RuleGroupSummary destAddr := &col if err := awsAwsjson11_deserializeDocumentRuleGroupSummary(&destAddr, value); err != nil { return err } col = *destAddr cv = append(cv, col) } *v = cv return nil } func awsAwsjson11_deserializeDocumentRuleGroupSummary(v **types.RuleGroupSummary, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.RuleGroupSummary if *v == nil { sv = &types.RuleGroupSummary{} } else { sv = *v } for key, value := range shape { switch key { case "Name": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ResourceName to be of type string, got %T instead", value) } sv.Name = ptr.String(jtv) } case "RuleGroupId": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ResourceId to be of type string, got %T instead", value) } sv.RuleGroupId = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentRuleSummaries(v *[]types.RuleSummary, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.([]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var cv []types.RuleSummary if *v == nil { cv = []types.RuleSummary{} } else { cv = *v } for _, value := range shape { var col types.RuleSummary destAddr := &col if err := awsAwsjson11_deserializeDocumentRuleSummary(&destAddr, value); err != nil { return err } col = *destAddr cv = append(cv, col) } *v = cv return nil } func awsAwsjson11_deserializeDocumentRuleSummary(v **types.RuleSummary, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.RuleSummary if *v == nil { sv = &types.RuleSummary{} } else { sv = *v } for key, value := range shape { switch key { case "Name": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ResourceName to be of type string, got %T instead", value) } sv.Name = ptr.String(jtv) } case "RuleId": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ResourceId to be of type string, got %T instead", value) } sv.RuleId = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentSampledHTTPRequest(v **types.SampledHTTPRequest, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.SampledHTTPRequest if *v == nil { sv = &types.SampledHTTPRequest{} } else { sv = *v } for key, value := range shape { switch key { case "Action": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected Action to be of type string, got %T instead", value) } sv.Action = ptr.String(jtv) } case "Request": if err := awsAwsjson11_deserializeDocumentHTTPRequest(&sv.Request, value); err != nil { return err } case "RuleWithinRuleGroup": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ResourceId to be of type string, got %T instead", value) } sv.RuleWithinRuleGroup = ptr.String(jtv) } case "Timestamp": if value != nil { switch jtv := value.(type) { case json.Number: f64, err := jtv.Float64() if err != nil { return err } sv.Timestamp = ptr.Time(smithytime.ParseEpochSeconds(f64)) default: return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) } } case "Weight": if value != nil { jtv, ok := value.(json.Number) if !ok { return fmt.Errorf("expected SampleWeight to be json.Number, got %T instead", value) } i64, err := jtv.Int64() if err != nil { return err } sv.Weight = i64 } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentSampledHTTPRequests(v *[]types.SampledHTTPRequest, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.([]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var cv []types.SampledHTTPRequest if *v == nil { cv = []types.SampledHTTPRequest{} } else { cv = *v } for _, value := range shape { var col types.SampledHTTPRequest destAddr := &col if err := awsAwsjson11_deserializeDocumentSampledHTTPRequest(&destAddr, value); err != nil { return err } col = *destAddr cv = append(cv, col) } *v = cv return nil } func awsAwsjson11_deserializeDocumentSizeConstraint(v **types.SizeConstraint, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.SizeConstraint if *v == nil { sv = &types.SizeConstraint{} } else { sv = *v } for key, value := range shape { switch key { case "ComparisonOperator": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ComparisonOperator to be of type string, got %T instead", value) } sv.ComparisonOperator = types.ComparisonOperator(jtv) } case "FieldToMatch": if err := awsAwsjson11_deserializeDocumentFieldToMatch(&sv.FieldToMatch, value); err != nil { return err } case "Size": if value != nil { jtv, ok := value.(json.Number) if !ok { return fmt.Errorf("expected Size to be json.Number, got %T instead", value) } i64, err := jtv.Int64() if err != nil { return err } sv.Size = i64 } case "TextTransformation": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected TextTransformation to be of type string, got %T instead", value) } sv.TextTransformation = types.TextTransformation(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentSizeConstraints(v *[]types.SizeConstraint, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.([]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var cv []types.SizeConstraint if *v == nil { cv = []types.SizeConstraint{} } else { cv = *v } for _, value := range shape { var col types.SizeConstraint destAddr := &col if err := awsAwsjson11_deserializeDocumentSizeConstraint(&destAddr, value); err != nil { return err } col = *destAddr cv = append(cv, col) } *v = cv return nil } func awsAwsjson11_deserializeDocumentSizeConstraintSet(v **types.SizeConstraintSet, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.SizeConstraintSet if *v == nil { sv = &types.SizeConstraintSet{} } else { sv = *v } for key, value := range shape { switch key { case "Name": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ResourceName to be of type string, got %T instead", value) } sv.Name = ptr.String(jtv) } case "SizeConstraints": if err := awsAwsjson11_deserializeDocumentSizeConstraints(&sv.SizeConstraints, value); err != nil { return err } case "SizeConstraintSetId": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ResourceId to be of type string, got %T instead", value) } sv.SizeConstraintSetId = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentSizeConstraintSetSummaries(v *[]types.SizeConstraintSetSummary, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.([]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var cv []types.SizeConstraintSetSummary if *v == nil { cv = []types.SizeConstraintSetSummary{} } else { cv = *v } for _, value := range shape { var col types.SizeConstraintSetSummary destAddr := &col if err := awsAwsjson11_deserializeDocumentSizeConstraintSetSummary(&destAddr, value); err != nil { return err } col = *destAddr cv = append(cv, col) } *v = cv return nil } func awsAwsjson11_deserializeDocumentSizeConstraintSetSummary(v **types.SizeConstraintSetSummary, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.SizeConstraintSetSummary if *v == nil { sv = &types.SizeConstraintSetSummary{} } else { sv = *v } for key, value := range shape { switch key { case "Name": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ResourceName to be of type string, got %T instead", value) } sv.Name = ptr.String(jtv) } case "SizeConstraintSetId": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ResourceId to be of type string, got %T instead", value) } sv.SizeConstraintSetId = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentSqlInjectionMatchSet(v **types.SqlInjectionMatchSet, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.SqlInjectionMatchSet if *v == nil { sv = &types.SqlInjectionMatchSet{} } else { sv = *v } for key, value := range shape { switch key { case "Name": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ResourceName to be of type string, got %T instead", value) } sv.Name = ptr.String(jtv) } case "SqlInjectionMatchSetId": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ResourceId to be of type string, got %T instead", value) } sv.SqlInjectionMatchSetId = ptr.String(jtv) } case "SqlInjectionMatchTuples": if err := awsAwsjson11_deserializeDocumentSqlInjectionMatchTuples(&sv.SqlInjectionMatchTuples, value); err != nil { return err } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentSqlInjectionMatchSetSummaries(v *[]types.SqlInjectionMatchSetSummary, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.([]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var cv []types.SqlInjectionMatchSetSummary if *v == nil { cv = []types.SqlInjectionMatchSetSummary{} } else { cv = *v } for _, value := range shape { var col types.SqlInjectionMatchSetSummary destAddr := &col if err := awsAwsjson11_deserializeDocumentSqlInjectionMatchSetSummary(&destAddr, value); err != nil { return err } col = *destAddr cv = append(cv, col) } *v = cv return nil } func awsAwsjson11_deserializeDocumentSqlInjectionMatchSetSummary(v **types.SqlInjectionMatchSetSummary, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.SqlInjectionMatchSetSummary if *v == nil { sv = &types.SqlInjectionMatchSetSummary{} } else { sv = *v } for key, value := range shape { switch key { case "Name": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ResourceName to be of type string, got %T instead", value) } sv.Name = ptr.String(jtv) } case "SqlInjectionMatchSetId": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ResourceId to be of type string, got %T instead", value) } sv.SqlInjectionMatchSetId = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentSqlInjectionMatchTuple(v **types.SqlInjectionMatchTuple, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.SqlInjectionMatchTuple if *v == nil { sv = &types.SqlInjectionMatchTuple{} } else { sv = *v } for key, value := range shape { switch key { case "FieldToMatch": if err := awsAwsjson11_deserializeDocumentFieldToMatch(&sv.FieldToMatch, value); err != nil { return err } case "TextTransformation": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected TextTransformation to be of type string, got %T instead", value) } sv.TextTransformation = types.TextTransformation(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentSqlInjectionMatchTuples(v *[]types.SqlInjectionMatchTuple, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.([]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var cv []types.SqlInjectionMatchTuple if *v == nil { cv = []types.SqlInjectionMatchTuple{} } else { cv = *v } for _, value := range shape { var col types.SqlInjectionMatchTuple destAddr := &col if err := awsAwsjson11_deserializeDocumentSqlInjectionMatchTuple(&destAddr, value); err != nil { return err } col = *destAddr cv = append(cv, col) } *v = cv return nil } func awsAwsjson11_deserializeDocumentSubscribedRuleGroupSummaries(v *[]types.SubscribedRuleGroupSummary, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.([]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var cv []types.SubscribedRuleGroupSummary if *v == nil { cv = []types.SubscribedRuleGroupSummary{} } else { cv = *v } for _, value := range shape { var col types.SubscribedRuleGroupSummary destAddr := &col if err := awsAwsjson11_deserializeDocumentSubscribedRuleGroupSummary(&destAddr, value); err != nil { return err } col = *destAddr cv = append(cv, col) } *v = cv return nil } func awsAwsjson11_deserializeDocumentSubscribedRuleGroupSummary(v **types.SubscribedRuleGroupSummary, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.SubscribedRuleGroupSummary if *v == nil { sv = &types.SubscribedRuleGroupSummary{} } else { sv = *v } for key, value := range shape { switch key { case "MetricName": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected MetricName to be of type string, got %T instead", value) } sv.MetricName = ptr.String(jtv) } case "Name": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ResourceName to be of type string, got %T instead", value) } sv.Name = ptr.String(jtv) } case "RuleGroupId": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ResourceId to be of type string, got %T instead", value) } sv.RuleGroupId = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentTag(v **types.Tag, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.Tag if *v == nil { sv = &types.Tag{} } else { sv = *v } for key, value := range shape { switch key { case "Key": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected TagKey to be of type string, got %T instead", value) } sv.Key = ptr.String(jtv) } case "Value": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected TagValue to be of type string, got %T instead", value) } sv.Value = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentTagInfoForResource(v **types.TagInfoForResource, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.TagInfoForResource if *v == nil { sv = &types.TagInfoForResource{} } else { sv = *v } for key, value := range shape { switch key { case "ResourceARN": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ResourceArn to be of type string, got %T instead", value) } sv.ResourceARN = ptr.String(jtv) } case "TagList": if err := awsAwsjson11_deserializeDocumentTagList(&sv.TagList, value); err != nil { return err } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentTagList(v *[]types.Tag, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.([]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var cv []types.Tag if *v == nil { cv = []types.Tag{} } else { cv = *v } for _, value := range shape { var col types.Tag destAddr := &col if err := awsAwsjson11_deserializeDocumentTag(&destAddr, value); err != nil { return err } col = *destAddr cv = append(cv, col) } *v = cv return nil } func awsAwsjson11_deserializeDocumentTimeWindow(v **types.TimeWindow, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.TimeWindow if *v == nil { sv = &types.TimeWindow{} } else { sv = *v } for key, value := range shape { switch key { case "EndTime": if value != nil { switch jtv := value.(type) { case json.Number: f64, err := jtv.Float64() if err != nil { return err } sv.EndTime = ptr.Time(smithytime.ParseEpochSeconds(f64)) default: return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) } } case "StartTime": if value != nil { switch jtv := value.(type) { case json.Number: f64, err := jtv.Float64() if err != nil { return err } sv.StartTime = ptr.Time(smithytime.ParseEpochSeconds(f64)) default: return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) } } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentWafAction(v **types.WafAction, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.WafAction if *v == nil { sv = &types.WafAction{} } else { sv = *v } for key, value := range shape { switch key { case "Type": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected WafActionType to be of type string, got %T instead", value) } sv.Type = types.WafActionType(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentWAFBadRequestException(v **types.WAFBadRequestException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.WAFBadRequestException if *v == nil { sv = &types.WAFBadRequestException{} } else { sv = *v } for key, value := range shape { switch key { case "message": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected errorMessage to be of type string, got %T instead", value) } sv.Message = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentWAFDisallowedNameException(v **types.WAFDisallowedNameException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.WAFDisallowedNameException if *v == nil { sv = &types.WAFDisallowedNameException{} } else { sv = *v } for key, value := range shape { switch key { case "message": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected errorMessage to be of type string, got %T instead", value) } sv.Message = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentWAFEntityMigrationException(v **types.WAFEntityMigrationException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.WAFEntityMigrationException if *v == nil { sv = &types.WAFEntityMigrationException{} } else { sv = *v } for key, value := range shape { switch key { case "message": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected errorMessage to be of type string, got %T instead", value) } sv.Message = ptr.String(jtv) } case "MigrationErrorReason": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ErrorReason to be of type string, got %T instead", value) } sv.MigrationErrorReason = ptr.String(jtv) } case "MigrationErrorType": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected MigrationErrorType to be of type string, got %T instead", value) } sv.MigrationErrorType = types.MigrationErrorType(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentWAFInternalErrorException(v **types.WAFInternalErrorException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.WAFInternalErrorException if *v == nil { sv = &types.WAFInternalErrorException{} } else { sv = *v } for key, value := range shape { switch key { case "message": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected errorMessage to be of type string, got %T instead", value) } sv.Message = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentWAFInvalidAccountException(v **types.WAFInvalidAccountException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.WAFInvalidAccountException if *v == nil { sv = &types.WAFInvalidAccountException{} } else { sv = *v } for key, value := range shape { switch key { default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentWAFInvalidOperationException(v **types.WAFInvalidOperationException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.WAFInvalidOperationException if *v == nil { sv = &types.WAFInvalidOperationException{} } else { sv = *v } for key, value := range shape { switch key { case "message": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected errorMessage to be of type string, got %T instead", value) } sv.Message = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentWAFInvalidParameterException(v **types.WAFInvalidParameterException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.WAFInvalidParameterException if *v == nil { sv = &types.WAFInvalidParameterException{} } else { sv = *v } for key, value := range shape { switch key { case "field": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ParameterExceptionField to be of type string, got %T instead", value) } sv.Field = types.ParameterExceptionField(jtv) } case "parameter": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ParameterExceptionParameter to be of type string, got %T instead", value) } sv.Parameter = ptr.String(jtv) } case "reason": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ParameterExceptionReason to be of type string, got %T instead", value) } sv.Reason = types.ParameterExceptionReason(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentWAFInvalidPermissionPolicyException(v **types.WAFInvalidPermissionPolicyException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.WAFInvalidPermissionPolicyException if *v == nil { sv = &types.WAFInvalidPermissionPolicyException{} } else { sv = *v } for key, value := range shape { switch key { case "message": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected errorMessage to be of type string, got %T instead", value) } sv.Message = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentWAFInvalidRegexPatternException(v **types.WAFInvalidRegexPatternException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.WAFInvalidRegexPatternException if *v == nil { sv = &types.WAFInvalidRegexPatternException{} } else { sv = *v } for key, value := range shape { switch key { case "message": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected errorMessage to be of type string, got %T instead", value) } sv.Message = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentWAFLimitsExceededException(v **types.WAFLimitsExceededException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.WAFLimitsExceededException if *v == nil { sv = &types.WAFLimitsExceededException{} } else { sv = *v } for key, value := range shape { switch key { case "message": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected errorMessage to be of type string, got %T instead", value) } sv.Message = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentWAFNonEmptyEntityException(v **types.WAFNonEmptyEntityException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.WAFNonEmptyEntityException if *v == nil { sv = &types.WAFNonEmptyEntityException{} } else { sv = *v } for key, value := range shape { switch key { case "message": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected errorMessage to be of type string, got %T instead", value) } sv.Message = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentWAFNonexistentContainerException(v **types.WAFNonexistentContainerException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.WAFNonexistentContainerException if *v == nil { sv = &types.WAFNonexistentContainerException{} } else { sv = *v } for key, value := range shape { switch key { case "message": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected errorMessage to be of type string, got %T instead", value) } sv.Message = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentWAFNonexistentItemException(v **types.WAFNonexistentItemException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.WAFNonexistentItemException if *v == nil { sv = &types.WAFNonexistentItemException{} } else { sv = *v } for key, value := range shape { switch key { case "message": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected errorMessage to be of type string, got %T instead", value) } sv.Message = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentWafOverrideAction(v **types.WafOverrideAction, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.WafOverrideAction if *v == nil { sv = &types.WafOverrideAction{} } else { sv = *v } for key, value := range shape { switch key { case "Type": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected WafOverrideActionType to be of type string, got %T instead", value) } sv.Type = types.WafOverrideActionType(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentWAFReferencedItemException(v **types.WAFReferencedItemException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.WAFReferencedItemException if *v == nil { sv = &types.WAFReferencedItemException{} } else { sv = *v } for key, value := range shape { switch key { case "message": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected errorMessage to be of type string, got %T instead", value) } sv.Message = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentWAFServiceLinkedRoleErrorException(v **types.WAFServiceLinkedRoleErrorException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.WAFServiceLinkedRoleErrorException if *v == nil { sv = &types.WAFServiceLinkedRoleErrorException{} } else { sv = *v } for key, value := range shape { switch key { case "message": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected errorMessage to be of type string, got %T instead", value) } sv.Message = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentWAFStaleDataException(v **types.WAFStaleDataException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.WAFStaleDataException if *v == nil { sv = &types.WAFStaleDataException{} } else { sv = *v } for key, value := range shape { switch key { case "message": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected errorMessage to be of type string, got %T instead", value) } sv.Message = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentWAFSubscriptionNotFoundException(v **types.WAFSubscriptionNotFoundException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.WAFSubscriptionNotFoundException if *v == nil { sv = &types.WAFSubscriptionNotFoundException{} } else { sv = *v } for key, value := range shape { switch key { case "message": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected errorMessage to be of type string, got %T instead", value) } sv.Message = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentWAFTagOperationException(v **types.WAFTagOperationException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.WAFTagOperationException if *v == nil { sv = &types.WAFTagOperationException{} } else { sv = *v } for key, value := range shape { switch key { case "message": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected errorMessage to be of type string, got %T instead", value) } sv.Message = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentWAFTagOperationInternalErrorException(v **types.WAFTagOperationInternalErrorException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.WAFTagOperationInternalErrorException if *v == nil { sv = &types.WAFTagOperationInternalErrorException{} } else { sv = *v } for key, value := range shape { switch key { case "message": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected errorMessage to be of type string, got %T instead", value) } sv.Message = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentWebACL(v **types.WebACL, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.WebACL if *v == nil { sv = &types.WebACL{} } else { sv = *v } for key, value := range shape { switch key { case "DefaultAction": if err := awsAwsjson11_deserializeDocumentWafAction(&sv.DefaultAction, value); err != nil { return err } case "MetricName": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected MetricName to be of type string, got %T instead", value) } sv.MetricName = ptr.String(jtv) } case "Name": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ResourceName to be of type string, got %T instead", value) } sv.Name = ptr.String(jtv) } case "Rules": if err := awsAwsjson11_deserializeDocumentActivatedRules(&sv.Rules, value); err != nil { return err } case "WebACLArn": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ResourceArn to be of type string, got %T instead", value) } sv.WebACLArn = ptr.String(jtv) } case "WebACLId": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ResourceId to be of type string, got %T instead", value) } sv.WebACLId = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentWebACLSummaries(v *[]types.WebACLSummary, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.([]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var cv []types.WebACLSummary if *v == nil { cv = []types.WebACLSummary{} } else { cv = *v } for _, value := range shape { var col types.WebACLSummary destAddr := &col if err := awsAwsjson11_deserializeDocumentWebACLSummary(&destAddr, value); err != nil { return err } col = *destAddr cv = append(cv, col) } *v = cv return nil } func awsAwsjson11_deserializeDocumentWebACLSummary(v **types.WebACLSummary, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.WebACLSummary if *v == nil { sv = &types.WebACLSummary{} } else { sv = *v } for key, value := range shape { switch key { case "Name": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ResourceName to be of type string, got %T instead", value) } sv.Name = ptr.String(jtv) } case "WebACLId": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ResourceId to be of type string, got %T instead", value) } sv.WebACLId = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentXssMatchSet(v **types.XssMatchSet, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.XssMatchSet if *v == nil { sv = &types.XssMatchSet{} } else { sv = *v } for key, value := range shape { switch key { case "Name": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ResourceName to be of type string, got %T instead", value) } sv.Name = ptr.String(jtv) } case "XssMatchSetId": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ResourceId to be of type string, got %T instead", value) } sv.XssMatchSetId = ptr.String(jtv) } case "XssMatchTuples": if err := awsAwsjson11_deserializeDocumentXssMatchTuples(&sv.XssMatchTuples, value); err != nil { return err } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentXssMatchSetSummaries(v *[]types.XssMatchSetSummary, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.([]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var cv []types.XssMatchSetSummary if *v == nil { cv = []types.XssMatchSetSummary{} } else { cv = *v } for _, value := range shape { var col types.XssMatchSetSummary destAddr := &col if err := awsAwsjson11_deserializeDocumentXssMatchSetSummary(&destAddr, value); err != nil { return err } col = *destAddr cv = append(cv, col) } *v = cv return nil } func awsAwsjson11_deserializeDocumentXssMatchSetSummary(v **types.XssMatchSetSummary, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.XssMatchSetSummary if *v == nil { sv = &types.XssMatchSetSummary{} } else { sv = *v } for key, value := range shape { switch key { case "Name": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ResourceName to be of type string, got %T instead", value) } sv.Name = ptr.String(jtv) } case "XssMatchSetId": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ResourceId to be of type string, got %T instead", value) } sv.XssMatchSetId = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentXssMatchTuple(v **types.XssMatchTuple, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.XssMatchTuple if *v == nil { sv = &types.XssMatchTuple{} } else { sv = *v } for key, value := range shape { switch key { case "FieldToMatch": if err := awsAwsjson11_deserializeDocumentFieldToMatch(&sv.FieldToMatch, value); err != nil { return err } case "TextTransformation": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected TextTransformation to be of type string, got %T instead", value) } sv.TextTransformation = types.TextTransformation(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentXssMatchTuples(v *[]types.XssMatchTuple, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.([]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var cv []types.XssMatchTuple if *v == nil { cv = []types.XssMatchTuple{} } else { cv = *v } for _, value := range shape { var col types.XssMatchTuple destAddr := &col if err := awsAwsjson11_deserializeDocumentXssMatchTuple(&destAddr, value); err != nil { return err } col = *destAddr cv = append(cv, col) } *v = cv return nil } func awsAwsjson11_deserializeOpDocumentCreateByteMatchSetOutput(v **CreateByteMatchSetOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *CreateByteMatchSetOutput if *v == nil { sv = &CreateByteMatchSetOutput{} } else { sv = *v } for key, value := range shape { switch key { case "ByteMatchSet": if err := awsAwsjson11_deserializeDocumentByteMatchSet(&sv.ByteMatchSet, value); err != nil { return err } case "ChangeToken": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ChangeToken to be of type string, got %T instead", value) } sv.ChangeToken = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeOpDocumentCreateGeoMatchSetOutput(v **CreateGeoMatchSetOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *CreateGeoMatchSetOutput if *v == nil { sv = &CreateGeoMatchSetOutput{} } else { sv = *v } for key, value := range shape { switch key { case "ChangeToken": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ChangeToken to be of type string, got %T instead", value) } sv.ChangeToken = ptr.String(jtv) } case "GeoMatchSet": if err := awsAwsjson11_deserializeDocumentGeoMatchSet(&sv.GeoMatchSet, value); err != nil { return err } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeOpDocumentCreateIPSetOutput(v **CreateIPSetOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *CreateIPSetOutput if *v == nil { sv = &CreateIPSetOutput{} } else { sv = *v } for key, value := range shape { switch key { case "ChangeToken": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ChangeToken to be of type string, got %T instead", value) } sv.ChangeToken = ptr.String(jtv) } case "IPSet": if err := awsAwsjson11_deserializeDocumentIPSet(&sv.IPSet, value); err != nil { return err } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeOpDocumentCreateRateBasedRuleOutput(v **CreateRateBasedRuleOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *CreateRateBasedRuleOutput if *v == nil { sv = &CreateRateBasedRuleOutput{} } else { sv = *v } for key, value := range shape { switch key { case "ChangeToken": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ChangeToken to be of type string, got %T instead", value) } sv.ChangeToken = ptr.String(jtv) } case "Rule": if err := awsAwsjson11_deserializeDocumentRateBasedRule(&sv.Rule, value); err != nil { return err } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeOpDocumentCreateRegexMatchSetOutput(v **CreateRegexMatchSetOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *CreateRegexMatchSetOutput if *v == nil { sv = &CreateRegexMatchSetOutput{} } else { sv = *v } for key, value := range shape { switch key { case "ChangeToken": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ChangeToken to be of type string, got %T instead", value) } sv.ChangeToken = ptr.String(jtv) } case "RegexMatchSet": if err := awsAwsjson11_deserializeDocumentRegexMatchSet(&sv.RegexMatchSet, value); err != nil { return err } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeOpDocumentCreateRegexPatternSetOutput(v **CreateRegexPatternSetOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *CreateRegexPatternSetOutput if *v == nil { sv = &CreateRegexPatternSetOutput{} } else { sv = *v } for key, value := range shape { switch key { case "ChangeToken": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ChangeToken to be of type string, got %T instead", value) } sv.ChangeToken = ptr.String(jtv) } case "RegexPatternSet": if err := awsAwsjson11_deserializeDocumentRegexPatternSet(&sv.RegexPatternSet, value); err != nil { return err } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeOpDocumentCreateRuleGroupOutput(v **CreateRuleGroupOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *CreateRuleGroupOutput if *v == nil { sv = &CreateRuleGroupOutput{} } else { sv = *v } for key, value := range shape { switch key { case "ChangeToken": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ChangeToken to be of type string, got %T instead", value) } sv.ChangeToken = ptr.String(jtv) } case "RuleGroup": if err := awsAwsjson11_deserializeDocumentRuleGroup(&sv.RuleGroup, value); err != nil { return err } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeOpDocumentCreateRuleOutput(v **CreateRuleOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *CreateRuleOutput if *v == nil { sv = &CreateRuleOutput{} } else { sv = *v } for key, value := range shape { switch key { case "ChangeToken": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ChangeToken to be of type string, got %T instead", value) } sv.ChangeToken = ptr.String(jtv) } case "Rule": if err := awsAwsjson11_deserializeDocumentRule(&sv.Rule, value); err != nil { return err } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeOpDocumentCreateSizeConstraintSetOutput(v **CreateSizeConstraintSetOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *CreateSizeConstraintSetOutput if *v == nil { sv = &CreateSizeConstraintSetOutput{} } else { sv = *v } for key, value := range shape { switch key { case "ChangeToken": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ChangeToken to be of type string, got %T instead", value) } sv.ChangeToken = ptr.String(jtv) } case "SizeConstraintSet": if err := awsAwsjson11_deserializeDocumentSizeConstraintSet(&sv.SizeConstraintSet, value); err != nil { return err } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeOpDocumentCreateSqlInjectionMatchSetOutput(v **CreateSqlInjectionMatchSetOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *CreateSqlInjectionMatchSetOutput if *v == nil { sv = &CreateSqlInjectionMatchSetOutput{} } else { sv = *v } for key, value := range shape { switch key { case "ChangeToken": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ChangeToken to be of type string, got %T instead", value) } sv.ChangeToken = ptr.String(jtv) } case "SqlInjectionMatchSet": if err := awsAwsjson11_deserializeDocumentSqlInjectionMatchSet(&sv.SqlInjectionMatchSet, value); err != nil { return err } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeOpDocumentCreateWebACLMigrationStackOutput(v **CreateWebACLMigrationStackOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *CreateWebACLMigrationStackOutput if *v == nil { sv = &CreateWebACLMigrationStackOutput{} } else { sv = *v } for key, value := range shape { switch key { case "S3ObjectUrl": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected S3ObjectUrl to be of type string, got %T instead", value) } sv.S3ObjectUrl = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeOpDocumentCreateWebACLOutput(v **CreateWebACLOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *CreateWebACLOutput if *v == nil { sv = &CreateWebACLOutput{} } else { sv = *v } for key, value := range shape { switch key { case "ChangeToken": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ChangeToken to be of type string, got %T instead", value) } sv.ChangeToken = ptr.String(jtv) } case "WebACL": if err := awsAwsjson11_deserializeDocumentWebACL(&sv.WebACL, value); err != nil { return err } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeOpDocumentCreateXssMatchSetOutput(v **CreateXssMatchSetOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *CreateXssMatchSetOutput if *v == nil { sv = &CreateXssMatchSetOutput{} } else { sv = *v } for key, value := range shape { switch key { case "ChangeToken": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ChangeToken to be of type string, got %T instead", value) } sv.ChangeToken = ptr.String(jtv) } case "XssMatchSet": if err := awsAwsjson11_deserializeDocumentXssMatchSet(&sv.XssMatchSet, value); err != nil { return err } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeOpDocumentDeleteByteMatchSetOutput(v **DeleteByteMatchSetOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *DeleteByteMatchSetOutput if *v == nil { sv = &DeleteByteMatchSetOutput{} } else { sv = *v } for key, value := range shape { switch key { case "ChangeToken": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ChangeToken to be of type string, got %T instead", value) } sv.ChangeToken = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeOpDocumentDeleteGeoMatchSetOutput(v **DeleteGeoMatchSetOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *DeleteGeoMatchSetOutput if *v == nil { sv = &DeleteGeoMatchSetOutput{} } else { sv = *v } for key, value := range shape { switch key { case "ChangeToken": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ChangeToken to be of type string, got %T instead", value) } sv.ChangeToken = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeOpDocumentDeleteIPSetOutput(v **DeleteIPSetOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *DeleteIPSetOutput if *v == nil { sv = &DeleteIPSetOutput{} } else { sv = *v } for key, value := range shape { switch key { case "ChangeToken": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ChangeToken to be of type string, got %T instead", value) } sv.ChangeToken = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeOpDocumentDeleteLoggingConfigurationOutput(v **DeleteLoggingConfigurationOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *DeleteLoggingConfigurationOutput if *v == nil { sv = &DeleteLoggingConfigurationOutput{} } else { sv = *v } for key, value := range shape { switch key { default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeOpDocumentDeletePermissionPolicyOutput(v **DeletePermissionPolicyOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *DeletePermissionPolicyOutput if *v == nil { sv = &DeletePermissionPolicyOutput{} } else { sv = *v } for key, value := range shape { switch key { default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeOpDocumentDeleteRateBasedRuleOutput(v **DeleteRateBasedRuleOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *DeleteRateBasedRuleOutput if *v == nil { sv = &DeleteRateBasedRuleOutput{} } else { sv = *v } for key, value := range shape { switch key { case "ChangeToken": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ChangeToken to be of type string, got %T instead", value) } sv.ChangeToken = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeOpDocumentDeleteRegexMatchSetOutput(v **DeleteRegexMatchSetOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *DeleteRegexMatchSetOutput if *v == nil { sv = &DeleteRegexMatchSetOutput{} } else { sv = *v } for key, value := range shape { switch key { case "ChangeToken": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ChangeToken to be of type string, got %T instead", value) } sv.ChangeToken = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeOpDocumentDeleteRegexPatternSetOutput(v **DeleteRegexPatternSetOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *DeleteRegexPatternSetOutput if *v == nil { sv = &DeleteRegexPatternSetOutput{} } else { sv = *v } for key, value := range shape { switch key { case "ChangeToken": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ChangeToken to be of type string, got %T instead", value) } sv.ChangeToken = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeOpDocumentDeleteRuleGroupOutput(v **DeleteRuleGroupOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *DeleteRuleGroupOutput if *v == nil { sv = &DeleteRuleGroupOutput{} } else { sv = *v } for key, value := range shape { switch key { case "ChangeToken": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ChangeToken to be of type string, got %T instead", value) } sv.ChangeToken = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeOpDocumentDeleteRuleOutput(v **DeleteRuleOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *DeleteRuleOutput if *v == nil { sv = &DeleteRuleOutput{} } else { sv = *v } for key, value := range shape { switch key { case "ChangeToken": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ChangeToken to be of type string, got %T instead", value) } sv.ChangeToken = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeOpDocumentDeleteSizeConstraintSetOutput(v **DeleteSizeConstraintSetOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *DeleteSizeConstraintSetOutput if *v == nil { sv = &DeleteSizeConstraintSetOutput{} } else { sv = *v } for key, value := range shape { switch key { case "ChangeToken": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ChangeToken to be of type string, got %T instead", value) } sv.ChangeToken = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeOpDocumentDeleteSqlInjectionMatchSetOutput(v **DeleteSqlInjectionMatchSetOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *DeleteSqlInjectionMatchSetOutput if *v == nil { sv = &DeleteSqlInjectionMatchSetOutput{} } else { sv = *v } for key, value := range shape { switch key { case "ChangeToken": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ChangeToken to be of type string, got %T instead", value) } sv.ChangeToken = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeOpDocumentDeleteWebACLOutput(v **DeleteWebACLOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *DeleteWebACLOutput if *v == nil { sv = &DeleteWebACLOutput{} } else { sv = *v } for key, value := range shape { switch key { case "ChangeToken": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ChangeToken to be of type string, got %T instead", value) } sv.ChangeToken = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeOpDocumentDeleteXssMatchSetOutput(v **DeleteXssMatchSetOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *DeleteXssMatchSetOutput if *v == nil { sv = &DeleteXssMatchSetOutput{} } else { sv = *v } for key, value := range shape { switch key { case "ChangeToken": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ChangeToken to be of type string, got %T instead", value) } sv.ChangeToken = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeOpDocumentGetByteMatchSetOutput(v **GetByteMatchSetOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *GetByteMatchSetOutput if *v == nil { sv = &GetByteMatchSetOutput{} } else { sv = *v } for key, value := range shape { switch key { case "ByteMatchSet": if err := awsAwsjson11_deserializeDocumentByteMatchSet(&sv.ByteMatchSet, value); err != nil { return err } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeOpDocumentGetChangeTokenOutput(v **GetChangeTokenOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *GetChangeTokenOutput if *v == nil { sv = &GetChangeTokenOutput{} } else { sv = *v } for key, value := range shape { switch key { case "ChangeToken": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ChangeToken to be of type string, got %T instead", value) } sv.ChangeToken = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeOpDocumentGetChangeTokenStatusOutput(v **GetChangeTokenStatusOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *GetChangeTokenStatusOutput if *v == nil { sv = &GetChangeTokenStatusOutput{} } else { sv = *v } for key, value := range shape { switch key { case "ChangeTokenStatus": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ChangeTokenStatus to be of type string, got %T instead", value) } sv.ChangeTokenStatus = types.ChangeTokenStatus(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeOpDocumentGetGeoMatchSetOutput(v **GetGeoMatchSetOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *GetGeoMatchSetOutput if *v == nil { sv = &GetGeoMatchSetOutput{} } else { sv = *v } for key, value := range shape { switch key { case "GeoMatchSet": if err := awsAwsjson11_deserializeDocumentGeoMatchSet(&sv.GeoMatchSet, value); err != nil { return err } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeOpDocumentGetIPSetOutput(v **GetIPSetOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *GetIPSetOutput if *v == nil { sv = &GetIPSetOutput{} } else { sv = *v } for key, value := range shape { switch key { case "IPSet": if err := awsAwsjson11_deserializeDocumentIPSet(&sv.IPSet, value); err != nil { return err } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeOpDocumentGetLoggingConfigurationOutput(v **GetLoggingConfigurationOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *GetLoggingConfigurationOutput if *v == nil { sv = &GetLoggingConfigurationOutput{} } else { sv = *v } for key, value := range shape { switch key { case "LoggingConfiguration": if err := awsAwsjson11_deserializeDocumentLoggingConfiguration(&sv.LoggingConfiguration, value); err != nil { return err } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeOpDocumentGetPermissionPolicyOutput(v **GetPermissionPolicyOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *GetPermissionPolicyOutput if *v == nil { sv = &GetPermissionPolicyOutput{} } else { sv = *v } for key, value := range shape { switch key { case "Policy": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected PolicyString to be of type string, got %T instead", value) } sv.Policy = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeOpDocumentGetRateBasedRuleManagedKeysOutput(v **GetRateBasedRuleManagedKeysOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *GetRateBasedRuleManagedKeysOutput if *v == nil { sv = &GetRateBasedRuleManagedKeysOutput{} } else { sv = *v } for key, value := range shape { switch key { case "ManagedKeys": if err := awsAwsjson11_deserializeDocumentManagedKeys(&sv.ManagedKeys, value); err != nil { return err } case "NextMarker": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected NextMarker to be of type string, got %T instead", value) } sv.NextMarker = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeOpDocumentGetRateBasedRuleOutput(v **GetRateBasedRuleOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *GetRateBasedRuleOutput if *v == nil { sv = &GetRateBasedRuleOutput{} } else { sv = *v } for key, value := range shape { switch key { case "Rule": if err := awsAwsjson11_deserializeDocumentRateBasedRule(&sv.Rule, value); err != nil { return err } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeOpDocumentGetRegexMatchSetOutput(v **GetRegexMatchSetOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *GetRegexMatchSetOutput if *v == nil { sv = &GetRegexMatchSetOutput{} } else { sv = *v } for key, value := range shape { switch key { case "RegexMatchSet": if err := awsAwsjson11_deserializeDocumentRegexMatchSet(&sv.RegexMatchSet, value); err != nil { return err } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeOpDocumentGetRegexPatternSetOutput(v **GetRegexPatternSetOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *GetRegexPatternSetOutput if *v == nil { sv = &GetRegexPatternSetOutput{} } else { sv = *v } for key, value := range shape { switch key { case "RegexPatternSet": if err := awsAwsjson11_deserializeDocumentRegexPatternSet(&sv.RegexPatternSet, value); err != nil { return err } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeOpDocumentGetRuleGroupOutput(v **GetRuleGroupOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *GetRuleGroupOutput if *v == nil { sv = &GetRuleGroupOutput{} } else { sv = *v } for key, value := range shape { switch key { case "RuleGroup": if err := awsAwsjson11_deserializeDocumentRuleGroup(&sv.RuleGroup, value); err != nil { return err } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeOpDocumentGetRuleOutput(v **GetRuleOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *GetRuleOutput if *v == nil { sv = &GetRuleOutput{} } else { sv = *v } for key, value := range shape { switch key { case "Rule": if err := awsAwsjson11_deserializeDocumentRule(&sv.Rule, value); err != nil { return err } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeOpDocumentGetSampledRequestsOutput(v **GetSampledRequestsOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *GetSampledRequestsOutput if *v == nil { sv = &GetSampledRequestsOutput{} } else { sv = *v } for key, value := range shape { switch key { case "PopulationSize": if value != nil { jtv, ok := value.(json.Number) if !ok { return fmt.Errorf("expected PopulationSize to be json.Number, got %T instead", value) } i64, err := jtv.Int64() if err != nil { return err } sv.PopulationSize = i64 } case "SampledRequests": if err := awsAwsjson11_deserializeDocumentSampledHTTPRequests(&sv.SampledRequests, value); err != nil { return err } case "TimeWindow": if err := awsAwsjson11_deserializeDocumentTimeWindow(&sv.TimeWindow, value); err != nil { return err } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeOpDocumentGetSizeConstraintSetOutput(v **GetSizeConstraintSetOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *GetSizeConstraintSetOutput if *v == nil { sv = &GetSizeConstraintSetOutput{} } else { sv = *v } for key, value := range shape { switch key { case "SizeConstraintSet": if err := awsAwsjson11_deserializeDocumentSizeConstraintSet(&sv.SizeConstraintSet, value); err != nil { return err } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeOpDocumentGetSqlInjectionMatchSetOutput(v **GetSqlInjectionMatchSetOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *GetSqlInjectionMatchSetOutput if *v == nil { sv = &GetSqlInjectionMatchSetOutput{} } else { sv = *v } for key, value := range shape { switch key { case "SqlInjectionMatchSet": if err := awsAwsjson11_deserializeDocumentSqlInjectionMatchSet(&sv.SqlInjectionMatchSet, value); err != nil { return err } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeOpDocumentGetWebACLOutput(v **GetWebACLOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *GetWebACLOutput if *v == nil { sv = &GetWebACLOutput{} } else { sv = *v } for key, value := range shape { switch key { case "WebACL": if err := awsAwsjson11_deserializeDocumentWebACL(&sv.WebACL, value); err != nil { return err } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeOpDocumentGetXssMatchSetOutput(v **GetXssMatchSetOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *GetXssMatchSetOutput if *v == nil { sv = &GetXssMatchSetOutput{} } else { sv = *v } for key, value := range shape { switch key { case "XssMatchSet": if err := awsAwsjson11_deserializeDocumentXssMatchSet(&sv.XssMatchSet, value); err != nil { return err } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeOpDocumentListActivatedRulesInRuleGroupOutput(v **ListActivatedRulesInRuleGroupOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *ListActivatedRulesInRuleGroupOutput if *v == nil { sv = &ListActivatedRulesInRuleGroupOutput{} } else { sv = *v } for key, value := range shape { switch key { case "ActivatedRules": if err := awsAwsjson11_deserializeDocumentActivatedRules(&sv.ActivatedRules, value); err != nil { return err } case "NextMarker": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected NextMarker to be of type string, got %T instead", value) } sv.NextMarker = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeOpDocumentListByteMatchSetsOutput(v **ListByteMatchSetsOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *ListByteMatchSetsOutput if *v == nil { sv = &ListByteMatchSetsOutput{} } else { sv = *v } for key, value := range shape { switch key { case "ByteMatchSets": if err := awsAwsjson11_deserializeDocumentByteMatchSetSummaries(&sv.ByteMatchSets, value); err != nil { return err } case "NextMarker": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected NextMarker to be of type string, got %T instead", value) } sv.NextMarker = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeOpDocumentListGeoMatchSetsOutput(v **ListGeoMatchSetsOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *ListGeoMatchSetsOutput if *v == nil { sv = &ListGeoMatchSetsOutput{} } else { sv = *v } for key, value := range shape { switch key { case "GeoMatchSets": if err := awsAwsjson11_deserializeDocumentGeoMatchSetSummaries(&sv.GeoMatchSets, value); err != nil { return err } case "NextMarker": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected NextMarker to be of type string, got %T instead", value) } sv.NextMarker = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeOpDocumentListIPSetsOutput(v **ListIPSetsOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *ListIPSetsOutput if *v == nil { sv = &ListIPSetsOutput{} } else { sv = *v } for key, value := range shape { switch key { case "IPSets": if err := awsAwsjson11_deserializeDocumentIPSetSummaries(&sv.IPSets, value); err != nil { return err } case "NextMarker": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected NextMarker to be of type string, got %T instead", value) } sv.NextMarker = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeOpDocumentListLoggingConfigurationsOutput(v **ListLoggingConfigurationsOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *ListLoggingConfigurationsOutput if *v == nil { sv = &ListLoggingConfigurationsOutput{} } else { sv = *v } for key, value := range shape { switch key { case "LoggingConfigurations": if err := awsAwsjson11_deserializeDocumentLoggingConfigurations(&sv.LoggingConfigurations, value); err != nil { return err } case "NextMarker": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected NextMarker to be of type string, got %T instead", value) } sv.NextMarker = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeOpDocumentListRateBasedRulesOutput(v **ListRateBasedRulesOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *ListRateBasedRulesOutput if *v == nil { sv = &ListRateBasedRulesOutput{} } else { sv = *v } for key, value := range shape { switch key { case "NextMarker": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected NextMarker to be of type string, got %T instead", value) } sv.NextMarker = ptr.String(jtv) } case "Rules": if err := awsAwsjson11_deserializeDocumentRuleSummaries(&sv.Rules, value); err != nil { return err } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeOpDocumentListRegexMatchSetsOutput(v **ListRegexMatchSetsOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *ListRegexMatchSetsOutput if *v == nil { sv = &ListRegexMatchSetsOutput{} } else { sv = *v } for key, value := range shape { switch key { case "NextMarker": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected NextMarker to be of type string, got %T instead", value) } sv.NextMarker = ptr.String(jtv) } case "RegexMatchSets": if err := awsAwsjson11_deserializeDocumentRegexMatchSetSummaries(&sv.RegexMatchSets, value); err != nil { return err } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeOpDocumentListRegexPatternSetsOutput(v **ListRegexPatternSetsOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *ListRegexPatternSetsOutput if *v == nil { sv = &ListRegexPatternSetsOutput{} } else { sv = *v } for key, value := range shape { switch key { case "NextMarker": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected NextMarker to be of type string, got %T instead", value) } sv.NextMarker = ptr.String(jtv) } case "RegexPatternSets": if err := awsAwsjson11_deserializeDocumentRegexPatternSetSummaries(&sv.RegexPatternSets, value); err != nil { return err } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeOpDocumentListRuleGroupsOutput(v **ListRuleGroupsOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *ListRuleGroupsOutput if *v == nil { sv = &ListRuleGroupsOutput{} } else { sv = *v } for key, value := range shape { switch key { case "NextMarker": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected NextMarker to be of type string, got %T instead", value) } sv.NextMarker = ptr.String(jtv) } case "RuleGroups": if err := awsAwsjson11_deserializeDocumentRuleGroupSummaries(&sv.RuleGroups, value); err != nil { return err } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeOpDocumentListRulesOutput(v **ListRulesOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *ListRulesOutput if *v == nil { sv = &ListRulesOutput{} } else { sv = *v } for key, value := range shape { switch key { case "NextMarker": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected NextMarker to be of type string, got %T instead", value) } sv.NextMarker = ptr.String(jtv) } case "Rules": if err := awsAwsjson11_deserializeDocumentRuleSummaries(&sv.Rules, value); err != nil { return err } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeOpDocumentListSizeConstraintSetsOutput(v **ListSizeConstraintSetsOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *ListSizeConstraintSetsOutput if *v == nil { sv = &ListSizeConstraintSetsOutput{} } else { sv = *v } for key, value := range shape { switch key { case "NextMarker": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected NextMarker to be of type string, got %T instead", value) } sv.NextMarker = ptr.String(jtv) } case "SizeConstraintSets": if err := awsAwsjson11_deserializeDocumentSizeConstraintSetSummaries(&sv.SizeConstraintSets, value); err != nil { return err } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeOpDocumentListSqlInjectionMatchSetsOutput(v **ListSqlInjectionMatchSetsOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *ListSqlInjectionMatchSetsOutput if *v == nil { sv = &ListSqlInjectionMatchSetsOutput{} } else { sv = *v } for key, value := range shape { switch key { case "NextMarker": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected NextMarker to be of type string, got %T instead", value) } sv.NextMarker = ptr.String(jtv) } case "SqlInjectionMatchSets": if err := awsAwsjson11_deserializeDocumentSqlInjectionMatchSetSummaries(&sv.SqlInjectionMatchSets, value); err != nil { return err } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeOpDocumentListSubscribedRuleGroupsOutput(v **ListSubscribedRuleGroupsOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *ListSubscribedRuleGroupsOutput if *v == nil { sv = &ListSubscribedRuleGroupsOutput{} } else { sv = *v } for key, value := range shape { switch key { case "NextMarker": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected NextMarker to be of type string, got %T instead", value) } sv.NextMarker = ptr.String(jtv) } case "RuleGroups": if err := awsAwsjson11_deserializeDocumentSubscribedRuleGroupSummaries(&sv.RuleGroups, value); err != nil { return err } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeOpDocumentListTagsForResourceOutput(v **ListTagsForResourceOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *ListTagsForResourceOutput if *v == nil { sv = &ListTagsForResourceOutput{} } else { sv = *v } for key, value := range shape { switch key { case "NextMarker": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected NextMarker to be of type string, got %T instead", value) } sv.NextMarker = ptr.String(jtv) } case "TagInfoForResource": if err := awsAwsjson11_deserializeDocumentTagInfoForResource(&sv.TagInfoForResource, value); err != nil { return err } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeOpDocumentListWebACLsOutput(v **ListWebACLsOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *ListWebACLsOutput if *v == nil { sv = &ListWebACLsOutput{} } else { sv = *v } for key, value := range shape { switch key { case "NextMarker": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected NextMarker to be of type string, got %T instead", value) } sv.NextMarker = ptr.String(jtv) } case "WebACLs": if err := awsAwsjson11_deserializeDocumentWebACLSummaries(&sv.WebACLs, value); err != nil { return err } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeOpDocumentListXssMatchSetsOutput(v **ListXssMatchSetsOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *ListXssMatchSetsOutput if *v == nil { sv = &ListXssMatchSetsOutput{} } else { sv = *v } for key, value := range shape { switch key { case "NextMarker": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected NextMarker to be of type string, got %T instead", value) } sv.NextMarker = ptr.String(jtv) } case "XssMatchSets": if err := awsAwsjson11_deserializeDocumentXssMatchSetSummaries(&sv.XssMatchSets, value); err != nil { return err } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeOpDocumentPutLoggingConfigurationOutput(v **PutLoggingConfigurationOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *PutLoggingConfigurationOutput if *v == nil { sv = &PutLoggingConfigurationOutput{} } else { sv = *v } for key, value := range shape { switch key { case "LoggingConfiguration": if err := awsAwsjson11_deserializeDocumentLoggingConfiguration(&sv.LoggingConfiguration, value); err != nil { return err } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeOpDocumentPutPermissionPolicyOutput(v **PutPermissionPolicyOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *PutPermissionPolicyOutput if *v == nil { sv = &PutPermissionPolicyOutput{} } else { sv = *v } for key, value := range shape { switch key { default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeOpDocumentTagResourceOutput(v **TagResourceOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *TagResourceOutput if *v == nil { sv = &TagResourceOutput{} } else { sv = *v } for key, value := range shape { switch key { default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeOpDocumentUntagResourceOutput(v **UntagResourceOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *UntagResourceOutput if *v == nil { sv = &UntagResourceOutput{} } else { sv = *v } for key, value := range shape { switch key { default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeOpDocumentUpdateByteMatchSetOutput(v **UpdateByteMatchSetOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *UpdateByteMatchSetOutput if *v == nil { sv = &UpdateByteMatchSetOutput{} } else { sv = *v } for key, value := range shape { switch key { case "ChangeToken": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ChangeToken to be of type string, got %T instead", value) } sv.ChangeToken = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeOpDocumentUpdateGeoMatchSetOutput(v **UpdateGeoMatchSetOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *UpdateGeoMatchSetOutput if *v == nil { sv = &UpdateGeoMatchSetOutput{} } else { sv = *v } for key, value := range shape { switch key { case "ChangeToken": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ChangeToken to be of type string, got %T instead", value) } sv.ChangeToken = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeOpDocumentUpdateIPSetOutput(v **UpdateIPSetOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *UpdateIPSetOutput if *v == nil { sv = &UpdateIPSetOutput{} } else { sv = *v } for key, value := range shape { switch key { case "ChangeToken": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ChangeToken to be of type string, got %T instead", value) } sv.ChangeToken = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeOpDocumentUpdateRateBasedRuleOutput(v **UpdateRateBasedRuleOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *UpdateRateBasedRuleOutput if *v == nil { sv = &UpdateRateBasedRuleOutput{} } else { sv = *v } for key, value := range shape { switch key { case "ChangeToken": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ChangeToken to be of type string, got %T instead", value) } sv.ChangeToken = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeOpDocumentUpdateRegexMatchSetOutput(v **UpdateRegexMatchSetOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *UpdateRegexMatchSetOutput if *v == nil { sv = &UpdateRegexMatchSetOutput{} } else { sv = *v } for key, value := range shape { switch key { case "ChangeToken": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ChangeToken to be of type string, got %T instead", value) } sv.ChangeToken = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeOpDocumentUpdateRegexPatternSetOutput(v **UpdateRegexPatternSetOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *UpdateRegexPatternSetOutput if *v == nil { sv = &UpdateRegexPatternSetOutput{} } else { sv = *v } for key, value := range shape { switch key { case "ChangeToken": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ChangeToken to be of type string, got %T instead", value) } sv.ChangeToken = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeOpDocumentUpdateRuleGroupOutput(v **UpdateRuleGroupOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *UpdateRuleGroupOutput if *v == nil { sv = &UpdateRuleGroupOutput{} } else { sv = *v } for key, value := range shape { switch key { case "ChangeToken": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ChangeToken to be of type string, got %T instead", value) } sv.ChangeToken = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeOpDocumentUpdateRuleOutput(v **UpdateRuleOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *UpdateRuleOutput if *v == nil { sv = &UpdateRuleOutput{} } else { sv = *v } for key, value := range shape { switch key { case "ChangeToken": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ChangeToken to be of type string, got %T instead", value) } sv.ChangeToken = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeOpDocumentUpdateSizeConstraintSetOutput(v **UpdateSizeConstraintSetOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *UpdateSizeConstraintSetOutput if *v == nil { sv = &UpdateSizeConstraintSetOutput{} } else { sv = *v } for key, value := range shape { switch key { case "ChangeToken": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ChangeToken to be of type string, got %T instead", value) } sv.ChangeToken = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeOpDocumentUpdateSqlInjectionMatchSetOutput(v **UpdateSqlInjectionMatchSetOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *UpdateSqlInjectionMatchSetOutput if *v == nil { sv = &UpdateSqlInjectionMatchSetOutput{} } else { sv = *v } for key, value := range shape { switch key { case "ChangeToken": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ChangeToken to be of type string, got %T instead", value) } sv.ChangeToken = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeOpDocumentUpdateWebACLOutput(v **UpdateWebACLOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *UpdateWebACLOutput if *v == nil { sv = &UpdateWebACLOutput{} } else { sv = *v } for key, value := range shape { switch key { case "ChangeToken": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ChangeToken to be of type string, got %T instead", value) } sv.ChangeToken = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeOpDocumentUpdateXssMatchSetOutput(v **UpdateXssMatchSetOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *UpdateXssMatchSetOutput if *v == nil { sv = &UpdateXssMatchSetOutput{} } else { sv = *v } for key, value := range shape { switch key { case "ChangeToken": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ChangeToken to be of type string, got %T instead", value) } sv.ChangeToken = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil }
17,491
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. // Package waf provides the API client, operations, and parameter types for AWS // WAF. // // This is AWS WAF Classic documentation. For more information, see AWS WAF Classic (https://docs.aws.amazon.com/waf/latest/developerguide/classic-waf-chapter.html) // in the developer guide. For the latest version of AWS WAF, use the AWS WAFV2 API // and see the AWS WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html) // . With the latest version, AWS WAF has a single set of endpoints for regional // and global use. This is the AWS WAF Classic API Reference for using AWS WAF // Classic with Amazon CloudFront. The AWS WAF Classic actions and data types // listed in the reference are available for protecting Amazon CloudFront // distributions. You can use these actions and data types via the endpoint // waf.amazonaws.com. This guide is for developers who need detailed information // about the AWS WAF Classic API actions, data types, and errors. For detailed // information about AWS WAF Classic features and an overview of how to use the AWS // WAF Classic API, see the AWS WAF Classic (https://docs.aws.amazon.com/waf/latest/developerguide/classic-waf-chapter.html) // in the developer guide. package waf
20
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package waf import ( "context" "errors" "fmt" "github.com/aws/aws-sdk-go-v2/aws" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" internalendpoints "github.com/aws/aws-sdk-go-v2/service/waf/internal/endpoints" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" "net/url" "strings" ) // EndpointResolverOptions is the service endpoint resolver options type EndpointResolverOptions = internalendpoints.Options // EndpointResolver interface for resolving service endpoints. type EndpointResolver interface { ResolveEndpoint(region string, options EndpointResolverOptions) (aws.Endpoint, error) } var _ EndpointResolver = &internalendpoints.Resolver{} // NewDefaultEndpointResolver constructs a new service endpoint resolver func NewDefaultEndpointResolver() *internalendpoints.Resolver { return internalendpoints.New() } // EndpointResolverFunc is a helper utility that wraps a function so it satisfies // the EndpointResolver interface. This is useful when you want to add additional // endpoint resolving logic, or stub out specific endpoints with custom values. type EndpointResolverFunc func(region string, options EndpointResolverOptions) (aws.Endpoint, error) func (fn EndpointResolverFunc) ResolveEndpoint(region string, options EndpointResolverOptions) (endpoint aws.Endpoint, err error) { return fn(region, options) } func resolveDefaultEndpointConfiguration(o *Options) { if o.EndpointResolver != nil { return } o.EndpointResolver = NewDefaultEndpointResolver() } // EndpointResolverFromURL returns an EndpointResolver configured using the // provided endpoint url. By default, the resolved endpoint resolver uses the // client region as signing region, and the endpoint source is set to // EndpointSourceCustom.You can provide functional options to configure endpoint // values for the resolved endpoint. func EndpointResolverFromURL(url string, optFns ...func(*aws.Endpoint)) EndpointResolver { e := aws.Endpoint{URL: url, Source: aws.EndpointSourceCustom} for _, fn := range optFns { fn(&e) } return EndpointResolverFunc( func(region string, options EndpointResolverOptions) (aws.Endpoint, error) { if len(e.SigningRegion) == 0 { e.SigningRegion = region } return e, nil }, ) } type ResolveEndpoint struct { Resolver EndpointResolver Options EndpointResolverOptions } func (*ResolveEndpoint) ID() string { return "ResolveEndpoint" } func (m *ResolveEndpoint) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { req, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) } if m.Resolver == nil { return out, metadata, fmt.Errorf("expected endpoint resolver to not be nil") } eo := m.Options eo.Logger = middleware.GetLogger(ctx) var endpoint aws.Endpoint endpoint, err = m.Resolver.ResolveEndpoint(awsmiddleware.GetRegion(ctx), eo) if err != nil { return out, metadata, fmt.Errorf("failed to resolve service endpoint, %w", err) } req.URL, err = url.Parse(endpoint.URL) if err != nil { return out, metadata, fmt.Errorf("failed to parse endpoint URL: %w", err) } if len(awsmiddleware.GetSigningName(ctx)) == 0 { signingName := endpoint.SigningName if len(signingName) == 0 { signingName = "waf" } ctx = awsmiddleware.SetSigningName(ctx, signingName) } ctx = awsmiddleware.SetEndpointSource(ctx, endpoint.Source) ctx = smithyhttp.SetHostnameImmutable(ctx, endpoint.HostnameImmutable) ctx = awsmiddleware.SetSigningRegion(ctx, endpoint.SigningRegion) ctx = awsmiddleware.SetPartitionID(ctx, endpoint.PartitionID) return next.HandleSerialize(ctx, in) } func addResolveEndpointMiddleware(stack *middleware.Stack, o Options) error { return stack.Serialize.Insert(&ResolveEndpoint{ Resolver: o.EndpointResolver, Options: o.EndpointOptions, }, "OperationSerializer", middleware.Before) } func removeResolveEndpointMiddleware(stack *middleware.Stack) error { _, err := stack.Serialize.Remove((&ResolveEndpoint{}).ID()) return err } type wrappedEndpointResolver struct { awsResolver aws.EndpointResolverWithOptions resolver EndpointResolver } func (w *wrappedEndpointResolver) ResolveEndpoint(region string, options EndpointResolverOptions) (endpoint aws.Endpoint, err error) { if w.awsResolver == nil { goto fallback } endpoint, err = w.awsResolver.ResolveEndpoint(ServiceID, region, options) if err == nil { return endpoint, nil } if nf := (&aws.EndpointNotFoundError{}); !errors.As(err, &nf) { return endpoint, err } fallback: if w.resolver == nil { return endpoint, fmt.Errorf("default endpoint resolver provided was nil") } return w.resolver.ResolveEndpoint(region, options) } type awsEndpointResolverAdaptor func(service, region string) (aws.Endpoint, error) func (a awsEndpointResolverAdaptor) ResolveEndpoint(service, region string, options ...interface{}) (aws.Endpoint, error) { return a(service, region) } var _ aws.EndpointResolverWithOptions = awsEndpointResolverAdaptor(nil) // withEndpointResolver returns an EndpointResolver that first delegates endpoint resolution to the awsResolver. // If awsResolver returns aws.EndpointNotFoundError error, the resolver will use the the provided // fallbackResolver for resolution. // // fallbackResolver must not be nil func withEndpointResolver(awsResolver aws.EndpointResolver, awsResolverWithOptions aws.EndpointResolverWithOptions, fallbackResolver EndpointResolver) EndpointResolver { var resolver aws.EndpointResolverWithOptions if awsResolverWithOptions != nil { resolver = awsResolverWithOptions } else if awsResolver != nil { resolver = awsEndpointResolverAdaptor(awsResolver.ResolveEndpoint) } return &wrappedEndpointResolver{ awsResolver: resolver, resolver: fallbackResolver, } } func finalizeClientEndpointResolverOptions(options *Options) { options.EndpointOptions.LogDeprecated = options.ClientLogMode.IsDeprecatedUsage() if len(options.EndpointOptions.ResolvedRegion) == 0 { const fipsInfix = "-fips-" const fipsPrefix = "fips-" const fipsSuffix = "-fips" if strings.Contains(options.Region, fipsInfix) || strings.Contains(options.Region, fipsPrefix) || strings.Contains(options.Region, fipsSuffix) { options.EndpointOptions.ResolvedRegion = strings.ReplaceAll(strings.ReplaceAll(strings.ReplaceAll( options.Region, fipsInfix, "-"), fipsPrefix, ""), fipsSuffix, "") options.EndpointOptions.UseFIPSEndpoint = aws.FIPSEndpointStateEnabled } } }
201
aws-sdk-go-v2
aws
Go
// Code generated by internal/repotools/cmd/updatemodulemeta DO NOT EDIT. package waf // goModuleVersion is the tagged release for this module const goModuleVersion = "1.12.12"
7
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package waf
4
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package waf import ( "bytes" "context" "fmt" "github.com/aws/aws-sdk-go-v2/service/waf/types" smithy "github.com/aws/smithy-go" "github.com/aws/smithy-go/encoding/httpbinding" smithyjson "github.com/aws/smithy-go/encoding/json" "github.com/aws/smithy-go/middleware" smithytime "github.com/aws/smithy-go/time" smithyhttp "github.com/aws/smithy-go/transport/http" "path" ) type awsAwsjson11_serializeOpCreateByteMatchSet struct { } func (*awsAwsjson11_serializeOpCreateByteMatchSet) ID() string { return "OperationSerializer" } func (m *awsAwsjson11_serializeOpCreateByteMatchSet) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*CreateByteMatchSetInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") httpBindingEncoder.SetHeader("X-Amz-Target").String("AWSWAF_20150824.CreateByteMatchSet") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson11_serializeOpDocumentCreateByteMatchSetInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsjson11_serializeOpCreateGeoMatchSet struct { } func (*awsAwsjson11_serializeOpCreateGeoMatchSet) ID() string { return "OperationSerializer" } func (m *awsAwsjson11_serializeOpCreateGeoMatchSet) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*CreateGeoMatchSetInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") httpBindingEncoder.SetHeader("X-Amz-Target").String("AWSWAF_20150824.CreateGeoMatchSet") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson11_serializeOpDocumentCreateGeoMatchSetInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsjson11_serializeOpCreateIPSet struct { } func (*awsAwsjson11_serializeOpCreateIPSet) ID() string { return "OperationSerializer" } func (m *awsAwsjson11_serializeOpCreateIPSet) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*CreateIPSetInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") httpBindingEncoder.SetHeader("X-Amz-Target").String("AWSWAF_20150824.CreateIPSet") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson11_serializeOpDocumentCreateIPSetInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsjson11_serializeOpCreateRateBasedRule struct { } func (*awsAwsjson11_serializeOpCreateRateBasedRule) ID() string { return "OperationSerializer" } func (m *awsAwsjson11_serializeOpCreateRateBasedRule) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*CreateRateBasedRuleInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") httpBindingEncoder.SetHeader("X-Amz-Target").String("AWSWAF_20150824.CreateRateBasedRule") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson11_serializeOpDocumentCreateRateBasedRuleInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsjson11_serializeOpCreateRegexMatchSet struct { } func (*awsAwsjson11_serializeOpCreateRegexMatchSet) ID() string { return "OperationSerializer" } func (m *awsAwsjson11_serializeOpCreateRegexMatchSet) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*CreateRegexMatchSetInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") httpBindingEncoder.SetHeader("X-Amz-Target").String("AWSWAF_20150824.CreateRegexMatchSet") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson11_serializeOpDocumentCreateRegexMatchSetInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsjson11_serializeOpCreateRegexPatternSet struct { } func (*awsAwsjson11_serializeOpCreateRegexPatternSet) ID() string { return "OperationSerializer" } func (m *awsAwsjson11_serializeOpCreateRegexPatternSet) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*CreateRegexPatternSetInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") httpBindingEncoder.SetHeader("X-Amz-Target").String("AWSWAF_20150824.CreateRegexPatternSet") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson11_serializeOpDocumentCreateRegexPatternSetInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsjson11_serializeOpCreateRule struct { } func (*awsAwsjson11_serializeOpCreateRule) ID() string { return "OperationSerializer" } func (m *awsAwsjson11_serializeOpCreateRule) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*CreateRuleInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") httpBindingEncoder.SetHeader("X-Amz-Target").String("AWSWAF_20150824.CreateRule") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson11_serializeOpDocumentCreateRuleInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsjson11_serializeOpCreateRuleGroup struct { } func (*awsAwsjson11_serializeOpCreateRuleGroup) ID() string { return "OperationSerializer" } func (m *awsAwsjson11_serializeOpCreateRuleGroup) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*CreateRuleGroupInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") httpBindingEncoder.SetHeader("X-Amz-Target").String("AWSWAF_20150824.CreateRuleGroup") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson11_serializeOpDocumentCreateRuleGroupInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsjson11_serializeOpCreateSizeConstraintSet struct { } func (*awsAwsjson11_serializeOpCreateSizeConstraintSet) ID() string { return "OperationSerializer" } func (m *awsAwsjson11_serializeOpCreateSizeConstraintSet) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*CreateSizeConstraintSetInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") httpBindingEncoder.SetHeader("X-Amz-Target").String("AWSWAF_20150824.CreateSizeConstraintSet") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson11_serializeOpDocumentCreateSizeConstraintSetInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsjson11_serializeOpCreateSqlInjectionMatchSet struct { } func (*awsAwsjson11_serializeOpCreateSqlInjectionMatchSet) ID() string { return "OperationSerializer" } func (m *awsAwsjson11_serializeOpCreateSqlInjectionMatchSet) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*CreateSqlInjectionMatchSetInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") httpBindingEncoder.SetHeader("X-Amz-Target").String("AWSWAF_20150824.CreateSqlInjectionMatchSet") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson11_serializeOpDocumentCreateSqlInjectionMatchSetInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsjson11_serializeOpCreateWebACL struct { } func (*awsAwsjson11_serializeOpCreateWebACL) ID() string { return "OperationSerializer" } func (m *awsAwsjson11_serializeOpCreateWebACL) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*CreateWebACLInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") httpBindingEncoder.SetHeader("X-Amz-Target").String("AWSWAF_20150824.CreateWebACL") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson11_serializeOpDocumentCreateWebACLInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsjson11_serializeOpCreateWebACLMigrationStack struct { } func (*awsAwsjson11_serializeOpCreateWebACLMigrationStack) ID() string { return "OperationSerializer" } func (m *awsAwsjson11_serializeOpCreateWebACLMigrationStack) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*CreateWebACLMigrationStackInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") httpBindingEncoder.SetHeader("X-Amz-Target").String("AWSWAF_20150824.CreateWebACLMigrationStack") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson11_serializeOpDocumentCreateWebACLMigrationStackInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsjson11_serializeOpCreateXssMatchSet struct { } func (*awsAwsjson11_serializeOpCreateXssMatchSet) ID() string { return "OperationSerializer" } func (m *awsAwsjson11_serializeOpCreateXssMatchSet) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*CreateXssMatchSetInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") httpBindingEncoder.SetHeader("X-Amz-Target").String("AWSWAF_20150824.CreateXssMatchSet") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson11_serializeOpDocumentCreateXssMatchSetInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsjson11_serializeOpDeleteByteMatchSet struct { } func (*awsAwsjson11_serializeOpDeleteByteMatchSet) ID() string { return "OperationSerializer" } func (m *awsAwsjson11_serializeOpDeleteByteMatchSet) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*DeleteByteMatchSetInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") httpBindingEncoder.SetHeader("X-Amz-Target").String("AWSWAF_20150824.DeleteByteMatchSet") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson11_serializeOpDocumentDeleteByteMatchSetInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsjson11_serializeOpDeleteGeoMatchSet struct { } func (*awsAwsjson11_serializeOpDeleteGeoMatchSet) ID() string { return "OperationSerializer" } func (m *awsAwsjson11_serializeOpDeleteGeoMatchSet) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*DeleteGeoMatchSetInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") httpBindingEncoder.SetHeader("X-Amz-Target").String("AWSWAF_20150824.DeleteGeoMatchSet") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson11_serializeOpDocumentDeleteGeoMatchSetInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsjson11_serializeOpDeleteIPSet struct { } func (*awsAwsjson11_serializeOpDeleteIPSet) ID() string { return "OperationSerializer" } func (m *awsAwsjson11_serializeOpDeleteIPSet) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*DeleteIPSetInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") httpBindingEncoder.SetHeader("X-Amz-Target").String("AWSWAF_20150824.DeleteIPSet") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson11_serializeOpDocumentDeleteIPSetInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsjson11_serializeOpDeleteLoggingConfiguration struct { } func (*awsAwsjson11_serializeOpDeleteLoggingConfiguration) ID() string { return "OperationSerializer" } func (m *awsAwsjson11_serializeOpDeleteLoggingConfiguration) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*DeleteLoggingConfigurationInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") httpBindingEncoder.SetHeader("X-Amz-Target").String("AWSWAF_20150824.DeleteLoggingConfiguration") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson11_serializeOpDocumentDeleteLoggingConfigurationInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsjson11_serializeOpDeletePermissionPolicy struct { } func (*awsAwsjson11_serializeOpDeletePermissionPolicy) ID() string { return "OperationSerializer" } func (m *awsAwsjson11_serializeOpDeletePermissionPolicy) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*DeletePermissionPolicyInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") httpBindingEncoder.SetHeader("X-Amz-Target").String("AWSWAF_20150824.DeletePermissionPolicy") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson11_serializeOpDocumentDeletePermissionPolicyInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsjson11_serializeOpDeleteRateBasedRule struct { } func (*awsAwsjson11_serializeOpDeleteRateBasedRule) ID() string { return "OperationSerializer" } func (m *awsAwsjson11_serializeOpDeleteRateBasedRule) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*DeleteRateBasedRuleInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") httpBindingEncoder.SetHeader("X-Amz-Target").String("AWSWAF_20150824.DeleteRateBasedRule") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson11_serializeOpDocumentDeleteRateBasedRuleInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsjson11_serializeOpDeleteRegexMatchSet struct { } func (*awsAwsjson11_serializeOpDeleteRegexMatchSet) ID() string { return "OperationSerializer" } func (m *awsAwsjson11_serializeOpDeleteRegexMatchSet) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*DeleteRegexMatchSetInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") httpBindingEncoder.SetHeader("X-Amz-Target").String("AWSWAF_20150824.DeleteRegexMatchSet") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson11_serializeOpDocumentDeleteRegexMatchSetInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsjson11_serializeOpDeleteRegexPatternSet struct { } func (*awsAwsjson11_serializeOpDeleteRegexPatternSet) ID() string { return "OperationSerializer" } func (m *awsAwsjson11_serializeOpDeleteRegexPatternSet) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*DeleteRegexPatternSetInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") httpBindingEncoder.SetHeader("X-Amz-Target").String("AWSWAF_20150824.DeleteRegexPatternSet") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson11_serializeOpDocumentDeleteRegexPatternSetInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsjson11_serializeOpDeleteRule struct { } func (*awsAwsjson11_serializeOpDeleteRule) ID() string { return "OperationSerializer" } func (m *awsAwsjson11_serializeOpDeleteRule) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*DeleteRuleInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") httpBindingEncoder.SetHeader("X-Amz-Target").String("AWSWAF_20150824.DeleteRule") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson11_serializeOpDocumentDeleteRuleInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsjson11_serializeOpDeleteRuleGroup struct { } func (*awsAwsjson11_serializeOpDeleteRuleGroup) ID() string { return "OperationSerializer" } func (m *awsAwsjson11_serializeOpDeleteRuleGroup) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*DeleteRuleGroupInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") httpBindingEncoder.SetHeader("X-Amz-Target").String("AWSWAF_20150824.DeleteRuleGroup") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson11_serializeOpDocumentDeleteRuleGroupInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsjson11_serializeOpDeleteSizeConstraintSet struct { } func (*awsAwsjson11_serializeOpDeleteSizeConstraintSet) ID() string { return "OperationSerializer" } func (m *awsAwsjson11_serializeOpDeleteSizeConstraintSet) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*DeleteSizeConstraintSetInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") httpBindingEncoder.SetHeader("X-Amz-Target").String("AWSWAF_20150824.DeleteSizeConstraintSet") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson11_serializeOpDocumentDeleteSizeConstraintSetInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsjson11_serializeOpDeleteSqlInjectionMatchSet struct { } func (*awsAwsjson11_serializeOpDeleteSqlInjectionMatchSet) ID() string { return "OperationSerializer" } func (m *awsAwsjson11_serializeOpDeleteSqlInjectionMatchSet) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*DeleteSqlInjectionMatchSetInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") httpBindingEncoder.SetHeader("X-Amz-Target").String("AWSWAF_20150824.DeleteSqlInjectionMatchSet") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson11_serializeOpDocumentDeleteSqlInjectionMatchSetInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsjson11_serializeOpDeleteWebACL struct { } func (*awsAwsjson11_serializeOpDeleteWebACL) ID() string { return "OperationSerializer" } func (m *awsAwsjson11_serializeOpDeleteWebACL) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*DeleteWebACLInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") httpBindingEncoder.SetHeader("X-Amz-Target").String("AWSWAF_20150824.DeleteWebACL") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson11_serializeOpDocumentDeleteWebACLInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsjson11_serializeOpDeleteXssMatchSet struct { } func (*awsAwsjson11_serializeOpDeleteXssMatchSet) ID() string { return "OperationSerializer" } func (m *awsAwsjson11_serializeOpDeleteXssMatchSet) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*DeleteXssMatchSetInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") httpBindingEncoder.SetHeader("X-Amz-Target").String("AWSWAF_20150824.DeleteXssMatchSet") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson11_serializeOpDocumentDeleteXssMatchSetInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsjson11_serializeOpGetByteMatchSet struct { } func (*awsAwsjson11_serializeOpGetByteMatchSet) ID() string { return "OperationSerializer" } func (m *awsAwsjson11_serializeOpGetByteMatchSet) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*GetByteMatchSetInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") httpBindingEncoder.SetHeader("X-Amz-Target").String("AWSWAF_20150824.GetByteMatchSet") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson11_serializeOpDocumentGetByteMatchSetInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsjson11_serializeOpGetChangeToken struct { } func (*awsAwsjson11_serializeOpGetChangeToken) ID() string { return "OperationSerializer" } func (m *awsAwsjson11_serializeOpGetChangeToken) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*GetChangeTokenInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") httpBindingEncoder.SetHeader("X-Amz-Target").String("AWSWAF_20150824.GetChangeToken") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson11_serializeOpDocumentGetChangeTokenInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsjson11_serializeOpGetChangeTokenStatus struct { } func (*awsAwsjson11_serializeOpGetChangeTokenStatus) ID() string { return "OperationSerializer" } func (m *awsAwsjson11_serializeOpGetChangeTokenStatus) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*GetChangeTokenStatusInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") httpBindingEncoder.SetHeader("X-Amz-Target").String("AWSWAF_20150824.GetChangeTokenStatus") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson11_serializeOpDocumentGetChangeTokenStatusInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsjson11_serializeOpGetGeoMatchSet struct { } func (*awsAwsjson11_serializeOpGetGeoMatchSet) ID() string { return "OperationSerializer" } func (m *awsAwsjson11_serializeOpGetGeoMatchSet) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*GetGeoMatchSetInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") httpBindingEncoder.SetHeader("X-Amz-Target").String("AWSWAF_20150824.GetGeoMatchSet") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson11_serializeOpDocumentGetGeoMatchSetInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsjson11_serializeOpGetIPSet struct { } func (*awsAwsjson11_serializeOpGetIPSet) ID() string { return "OperationSerializer" } func (m *awsAwsjson11_serializeOpGetIPSet) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*GetIPSetInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") httpBindingEncoder.SetHeader("X-Amz-Target").String("AWSWAF_20150824.GetIPSet") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson11_serializeOpDocumentGetIPSetInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsjson11_serializeOpGetLoggingConfiguration struct { } func (*awsAwsjson11_serializeOpGetLoggingConfiguration) ID() string { return "OperationSerializer" } func (m *awsAwsjson11_serializeOpGetLoggingConfiguration) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*GetLoggingConfigurationInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") httpBindingEncoder.SetHeader("X-Amz-Target").String("AWSWAF_20150824.GetLoggingConfiguration") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson11_serializeOpDocumentGetLoggingConfigurationInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsjson11_serializeOpGetPermissionPolicy struct { } func (*awsAwsjson11_serializeOpGetPermissionPolicy) ID() string { return "OperationSerializer" } func (m *awsAwsjson11_serializeOpGetPermissionPolicy) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*GetPermissionPolicyInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") httpBindingEncoder.SetHeader("X-Amz-Target").String("AWSWAF_20150824.GetPermissionPolicy") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson11_serializeOpDocumentGetPermissionPolicyInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsjson11_serializeOpGetRateBasedRule struct { } func (*awsAwsjson11_serializeOpGetRateBasedRule) ID() string { return "OperationSerializer" } func (m *awsAwsjson11_serializeOpGetRateBasedRule) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*GetRateBasedRuleInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") httpBindingEncoder.SetHeader("X-Amz-Target").String("AWSWAF_20150824.GetRateBasedRule") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson11_serializeOpDocumentGetRateBasedRuleInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsjson11_serializeOpGetRateBasedRuleManagedKeys struct { } func (*awsAwsjson11_serializeOpGetRateBasedRuleManagedKeys) ID() string { return "OperationSerializer" } func (m *awsAwsjson11_serializeOpGetRateBasedRuleManagedKeys) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*GetRateBasedRuleManagedKeysInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") httpBindingEncoder.SetHeader("X-Amz-Target").String("AWSWAF_20150824.GetRateBasedRuleManagedKeys") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson11_serializeOpDocumentGetRateBasedRuleManagedKeysInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsjson11_serializeOpGetRegexMatchSet struct { } func (*awsAwsjson11_serializeOpGetRegexMatchSet) ID() string { return "OperationSerializer" } func (m *awsAwsjson11_serializeOpGetRegexMatchSet) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*GetRegexMatchSetInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") httpBindingEncoder.SetHeader("X-Amz-Target").String("AWSWAF_20150824.GetRegexMatchSet") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson11_serializeOpDocumentGetRegexMatchSetInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsjson11_serializeOpGetRegexPatternSet struct { } func (*awsAwsjson11_serializeOpGetRegexPatternSet) ID() string { return "OperationSerializer" } func (m *awsAwsjson11_serializeOpGetRegexPatternSet) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*GetRegexPatternSetInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") httpBindingEncoder.SetHeader("X-Amz-Target").String("AWSWAF_20150824.GetRegexPatternSet") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson11_serializeOpDocumentGetRegexPatternSetInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsjson11_serializeOpGetRule struct { } func (*awsAwsjson11_serializeOpGetRule) ID() string { return "OperationSerializer" } func (m *awsAwsjson11_serializeOpGetRule) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*GetRuleInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") httpBindingEncoder.SetHeader("X-Amz-Target").String("AWSWAF_20150824.GetRule") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson11_serializeOpDocumentGetRuleInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsjson11_serializeOpGetRuleGroup struct { } func (*awsAwsjson11_serializeOpGetRuleGroup) ID() string { return "OperationSerializer" } func (m *awsAwsjson11_serializeOpGetRuleGroup) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*GetRuleGroupInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") httpBindingEncoder.SetHeader("X-Amz-Target").String("AWSWAF_20150824.GetRuleGroup") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson11_serializeOpDocumentGetRuleGroupInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsjson11_serializeOpGetSampledRequests struct { } func (*awsAwsjson11_serializeOpGetSampledRequests) ID() string { return "OperationSerializer" } func (m *awsAwsjson11_serializeOpGetSampledRequests) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*GetSampledRequestsInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") httpBindingEncoder.SetHeader("X-Amz-Target").String("AWSWAF_20150824.GetSampledRequests") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson11_serializeOpDocumentGetSampledRequestsInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsjson11_serializeOpGetSizeConstraintSet struct { } func (*awsAwsjson11_serializeOpGetSizeConstraintSet) ID() string { return "OperationSerializer" } func (m *awsAwsjson11_serializeOpGetSizeConstraintSet) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*GetSizeConstraintSetInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") httpBindingEncoder.SetHeader("X-Amz-Target").String("AWSWAF_20150824.GetSizeConstraintSet") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson11_serializeOpDocumentGetSizeConstraintSetInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsjson11_serializeOpGetSqlInjectionMatchSet struct { } func (*awsAwsjson11_serializeOpGetSqlInjectionMatchSet) ID() string { return "OperationSerializer" } func (m *awsAwsjson11_serializeOpGetSqlInjectionMatchSet) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*GetSqlInjectionMatchSetInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") httpBindingEncoder.SetHeader("X-Amz-Target").String("AWSWAF_20150824.GetSqlInjectionMatchSet") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson11_serializeOpDocumentGetSqlInjectionMatchSetInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsjson11_serializeOpGetWebACL struct { } func (*awsAwsjson11_serializeOpGetWebACL) ID() string { return "OperationSerializer" } func (m *awsAwsjson11_serializeOpGetWebACL) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*GetWebACLInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") httpBindingEncoder.SetHeader("X-Amz-Target").String("AWSWAF_20150824.GetWebACL") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson11_serializeOpDocumentGetWebACLInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsjson11_serializeOpGetXssMatchSet struct { } func (*awsAwsjson11_serializeOpGetXssMatchSet) ID() string { return "OperationSerializer" } func (m *awsAwsjson11_serializeOpGetXssMatchSet) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*GetXssMatchSetInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") httpBindingEncoder.SetHeader("X-Amz-Target").String("AWSWAF_20150824.GetXssMatchSet") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson11_serializeOpDocumentGetXssMatchSetInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsjson11_serializeOpListActivatedRulesInRuleGroup struct { } func (*awsAwsjson11_serializeOpListActivatedRulesInRuleGroup) ID() string { return "OperationSerializer" } func (m *awsAwsjson11_serializeOpListActivatedRulesInRuleGroup) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*ListActivatedRulesInRuleGroupInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") httpBindingEncoder.SetHeader("X-Amz-Target").String("AWSWAF_20150824.ListActivatedRulesInRuleGroup") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson11_serializeOpDocumentListActivatedRulesInRuleGroupInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsjson11_serializeOpListByteMatchSets struct { } func (*awsAwsjson11_serializeOpListByteMatchSets) ID() string { return "OperationSerializer" } func (m *awsAwsjson11_serializeOpListByteMatchSets) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*ListByteMatchSetsInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") httpBindingEncoder.SetHeader("X-Amz-Target").String("AWSWAF_20150824.ListByteMatchSets") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson11_serializeOpDocumentListByteMatchSetsInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsjson11_serializeOpListGeoMatchSets struct { } func (*awsAwsjson11_serializeOpListGeoMatchSets) ID() string { return "OperationSerializer" } func (m *awsAwsjson11_serializeOpListGeoMatchSets) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*ListGeoMatchSetsInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") httpBindingEncoder.SetHeader("X-Amz-Target").String("AWSWAF_20150824.ListGeoMatchSets") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson11_serializeOpDocumentListGeoMatchSetsInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsjson11_serializeOpListIPSets struct { } func (*awsAwsjson11_serializeOpListIPSets) ID() string { return "OperationSerializer" } func (m *awsAwsjson11_serializeOpListIPSets) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*ListIPSetsInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") httpBindingEncoder.SetHeader("X-Amz-Target").String("AWSWAF_20150824.ListIPSets") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson11_serializeOpDocumentListIPSetsInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsjson11_serializeOpListLoggingConfigurations struct { } func (*awsAwsjson11_serializeOpListLoggingConfigurations) ID() string { return "OperationSerializer" } func (m *awsAwsjson11_serializeOpListLoggingConfigurations) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*ListLoggingConfigurationsInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") httpBindingEncoder.SetHeader("X-Amz-Target").String("AWSWAF_20150824.ListLoggingConfigurations") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson11_serializeOpDocumentListLoggingConfigurationsInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsjson11_serializeOpListRateBasedRules struct { } func (*awsAwsjson11_serializeOpListRateBasedRules) ID() string { return "OperationSerializer" } func (m *awsAwsjson11_serializeOpListRateBasedRules) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*ListRateBasedRulesInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") httpBindingEncoder.SetHeader("X-Amz-Target").String("AWSWAF_20150824.ListRateBasedRules") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson11_serializeOpDocumentListRateBasedRulesInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsjson11_serializeOpListRegexMatchSets struct { } func (*awsAwsjson11_serializeOpListRegexMatchSets) ID() string { return "OperationSerializer" } func (m *awsAwsjson11_serializeOpListRegexMatchSets) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*ListRegexMatchSetsInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") httpBindingEncoder.SetHeader("X-Amz-Target").String("AWSWAF_20150824.ListRegexMatchSets") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson11_serializeOpDocumentListRegexMatchSetsInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsjson11_serializeOpListRegexPatternSets struct { } func (*awsAwsjson11_serializeOpListRegexPatternSets) ID() string { return "OperationSerializer" } func (m *awsAwsjson11_serializeOpListRegexPatternSets) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*ListRegexPatternSetsInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") httpBindingEncoder.SetHeader("X-Amz-Target").String("AWSWAF_20150824.ListRegexPatternSets") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson11_serializeOpDocumentListRegexPatternSetsInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsjson11_serializeOpListRuleGroups struct { } func (*awsAwsjson11_serializeOpListRuleGroups) ID() string { return "OperationSerializer" } func (m *awsAwsjson11_serializeOpListRuleGroups) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*ListRuleGroupsInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") httpBindingEncoder.SetHeader("X-Amz-Target").String("AWSWAF_20150824.ListRuleGroups") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson11_serializeOpDocumentListRuleGroupsInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsjson11_serializeOpListRules struct { } func (*awsAwsjson11_serializeOpListRules) ID() string { return "OperationSerializer" } func (m *awsAwsjson11_serializeOpListRules) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*ListRulesInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") httpBindingEncoder.SetHeader("X-Amz-Target").String("AWSWAF_20150824.ListRules") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson11_serializeOpDocumentListRulesInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsjson11_serializeOpListSizeConstraintSets struct { } func (*awsAwsjson11_serializeOpListSizeConstraintSets) ID() string { return "OperationSerializer" } func (m *awsAwsjson11_serializeOpListSizeConstraintSets) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*ListSizeConstraintSetsInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") httpBindingEncoder.SetHeader("X-Amz-Target").String("AWSWAF_20150824.ListSizeConstraintSets") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson11_serializeOpDocumentListSizeConstraintSetsInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsjson11_serializeOpListSqlInjectionMatchSets struct { } func (*awsAwsjson11_serializeOpListSqlInjectionMatchSets) ID() string { return "OperationSerializer" } func (m *awsAwsjson11_serializeOpListSqlInjectionMatchSets) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*ListSqlInjectionMatchSetsInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") httpBindingEncoder.SetHeader("X-Amz-Target").String("AWSWAF_20150824.ListSqlInjectionMatchSets") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson11_serializeOpDocumentListSqlInjectionMatchSetsInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsjson11_serializeOpListSubscribedRuleGroups struct { } func (*awsAwsjson11_serializeOpListSubscribedRuleGroups) ID() string { return "OperationSerializer" } func (m *awsAwsjson11_serializeOpListSubscribedRuleGroups) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*ListSubscribedRuleGroupsInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") httpBindingEncoder.SetHeader("X-Amz-Target").String("AWSWAF_20150824.ListSubscribedRuleGroups") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson11_serializeOpDocumentListSubscribedRuleGroupsInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsjson11_serializeOpListTagsForResource struct { } func (*awsAwsjson11_serializeOpListTagsForResource) ID() string { return "OperationSerializer" } func (m *awsAwsjson11_serializeOpListTagsForResource) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*ListTagsForResourceInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") httpBindingEncoder.SetHeader("X-Amz-Target").String("AWSWAF_20150824.ListTagsForResource") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson11_serializeOpDocumentListTagsForResourceInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsjson11_serializeOpListWebACLs struct { } func (*awsAwsjson11_serializeOpListWebACLs) ID() string { return "OperationSerializer" } func (m *awsAwsjson11_serializeOpListWebACLs) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*ListWebACLsInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") httpBindingEncoder.SetHeader("X-Amz-Target").String("AWSWAF_20150824.ListWebACLs") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson11_serializeOpDocumentListWebACLsInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsjson11_serializeOpListXssMatchSets struct { } func (*awsAwsjson11_serializeOpListXssMatchSets) ID() string { return "OperationSerializer" } func (m *awsAwsjson11_serializeOpListXssMatchSets) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*ListXssMatchSetsInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") httpBindingEncoder.SetHeader("X-Amz-Target").String("AWSWAF_20150824.ListXssMatchSets") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson11_serializeOpDocumentListXssMatchSetsInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsjson11_serializeOpPutLoggingConfiguration struct { } func (*awsAwsjson11_serializeOpPutLoggingConfiguration) ID() string { return "OperationSerializer" } func (m *awsAwsjson11_serializeOpPutLoggingConfiguration) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*PutLoggingConfigurationInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") httpBindingEncoder.SetHeader("X-Amz-Target").String("AWSWAF_20150824.PutLoggingConfiguration") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson11_serializeOpDocumentPutLoggingConfigurationInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsjson11_serializeOpPutPermissionPolicy struct { } func (*awsAwsjson11_serializeOpPutPermissionPolicy) ID() string { return "OperationSerializer" } func (m *awsAwsjson11_serializeOpPutPermissionPolicy) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*PutPermissionPolicyInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") httpBindingEncoder.SetHeader("X-Amz-Target").String("AWSWAF_20150824.PutPermissionPolicy") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson11_serializeOpDocumentPutPermissionPolicyInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsjson11_serializeOpTagResource struct { } func (*awsAwsjson11_serializeOpTagResource) ID() string { return "OperationSerializer" } func (m *awsAwsjson11_serializeOpTagResource) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*TagResourceInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") httpBindingEncoder.SetHeader("X-Amz-Target").String("AWSWAF_20150824.TagResource") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson11_serializeOpDocumentTagResourceInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsjson11_serializeOpUntagResource struct { } func (*awsAwsjson11_serializeOpUntagResource) ID() string { return "OperationSerializer" } func (m *awsAwsjson11_serializeOpUntagResource) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*UntagResourceInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") httpBindingEncoder.SetHeader("X-Amz-Target").String("AWSWAF_20150824.UntagResource") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson11_serializeOpDocumentUntagResourceInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsjson11_serializeOpUpdateByteMatchSet struct { } func (*awsAwsjson11_serializeOpUpdateByteMatchSet) ID() string { return "OperationSerializer" } func (m *awsAwsjson11_serializeOpUpdateByteMatchSet) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*UpdateByteMatchSetInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") httpBindingEncoder.SetHeader("X-Amz-Target").String("AWSWAF_20150824.UpdateByteMatchSet") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson11_serializeOpDocumentUpdateByteMatchSetInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsjson11_serializeOpUpdateGeoMatchSet struct { } func (*awsAwsjson11_serializeOpUpdateGeoMatchSet) ID() string { return "OperationSerializer" } func (m *awsAwsjson11_serializeOpUpdateGeoMatchSet) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*UpdateGeoMatchSetInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") httpBindingEncoder.SetHeader("X-Amz-Target").String("AWSWAF_20150824.UpdateGeoMatchSet") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson11_serializeOpDocumentUpdateGeoMatchSetInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsjson11_serializeOpUpdateIPSet struct { } func (*awsAwsjson11_serializeOpUpdateIPSet) ID() string { return "OperationSerializer" } func (m *awsAwsjson11_serializeOpUpdateIPSet) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*UpdateIPSetInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") httpBindingEncoder.SetHeader("X-Amz-Target").String("AWSWAF_20150824.UpdateIPSet") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson11_serializeOpDocumentUpdateIPSetInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsjson11_serializeOpUpdateRateBasedRule struct { } func (*awsAwsjson11_serializeOpUpdateRateBasedRule) ID() string { return "OperationSerializer" } func (m *awsAwsjson11_serializeOpUpdateRateBasedRule) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*UpdateRateBasedRuleInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") httpBindingEncoder.SetHeader("X-Amz-Target").String("AWSWAF_20150824.UpdateRateBasedRule") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson11_serializeOpDocumentUpdateRateBasedRuleInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsjson11_serializeOpUpdateRegexMatchSet struct { } func (*awsAwsjson11_serializeOpUpdateRegexMatchSet) ID() string { return "OperationSerializer" } func (m *awsAwsjson11_serializeOpUpdateRegexMatchSet) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*UpdateRegexMatchSetInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") httpBindingEncoder.SetHeader("X-Amz-Target").String("AWSWAF_20150824.UpdateRegexMatchSet") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson11_serializeOpDocumentUpdateRegexMatchSetInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsjson11_serializeOpUpdateRegexPatternSet struct { } func (*awsAwsjson11_serializeOpUpdateRegexPatternSet) ID() string { return "OperationSerializer" } func (m *awsAwsjson11_serializeOpUpdateRegexPatternSet) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*UpdateRegexPatternSetInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") httpBindingEncoder.SetHeader("X-Amz-Target").String("AWSWAF_20150824.UpdateRegexPatternSet") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson11_serializeOpDocumentUpdateRegexPatternSetInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsjson11_serializeOpUpdateRule struct { } func (*awsAwsjson11_serializeOpUpdateRule) ID() string { return "OperationSerializer" } func (m *awsAwsjson11_serializeOpUpdateRule) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*UpdateRuleInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") httpBindingEncoder.SetHeader("X-Amz-Target").String("AWSWAF_20150824.UpdateRule") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson11_serializeOpDocumentUpdateRuleInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsjson11_serializeOpUpdateRuleGroup struct { } func (*awsAwsjson11_serializeOpUpdateRuleGroup) ID() string { return "OperationSerializer" } func (m *awsAwsjson11_serializeOpUpdateRuleGroup) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*UpdateRuleGroupInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") httpBindingEncoder.SetHeader("X-Amz-Target").String("AWSWAF_20150824.UpdateRuleGroup") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson11_serializeOpDocumentUpdateRuleGroupInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsjson11_serializeOpUpdateSizeConstraintSet struct { } func (*awsAwsjson11_serializeOpUpdateSizeConstraintSet) ID() string { return "OperationSerializer" } func (m *awsAwsjson11_serializeOpUpdateSizeConstraintSet) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*UpdateSizeConstraintSetInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") httpBindingEncoder.SetHeader("X-Amz-Target").String("AWSWAF_20150824.UpdateSizeConstraintSet") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson11_serializeOpDocumentUpdateSizeConstraintSetInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsjson11_serializeOpUpdateSqlInjectionMatchSet struct { } func (*awsAwsjson11_serializeOpUpdateSqlInjectionMatchSet) ID() string { return "OperationSerializer" } func (m *awsAwsjson11_serializeOpUpdateSqlInjectionMatchSet) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*UpdateSqlInjectionMatchSetInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") httpBindingEncoder.SetHeader("X-Amz-Target").String("AWSWAF_20150824.UpdateSqlInjectionMatchSet") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson11_serializeOpDocumentUpdateSqlInjectionMatchSetInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsjson11_serializeOpUpdateWebACL struct { } func (*awsAwsjson11_serializeOpUpdateWebACL) ID() string { return "OperationSerializer" } func (m *awsAwsjson11_serializeOpUpdateWebACL) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*UpdateWebACLInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") httpBindingEncoder.SetHeader("X-Amz-Target").String("AWSWAF_20150824.UpdateWebACL") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson11_serializeOpDocumentUpdateWebACLInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsjson11_serializeOpUpdateXssMatchSet struct { } func (*awsAwsjson11_serializeOpUpdateXssMatchSet) ID() string { return "OperationSerializer" } func (m *awsAwsjson11_serializeOpUpdateXssMatchSet) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*UpdateXssMatchSetInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") httpBindingEncoder.SetHeader("X-Amz-Target").String("AWSWAF_20150824.UpdateXssMatchSet") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson11_serializeOpDocumentUpdateXssMatchSetInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } func awsAwsjson11_serializeDocumentActivatedRule(v *types.ActivatedRule, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.Action != nil { ok := object.Key("Action") if err := awsAwsjson11_serializeDocumentWafAction(v.Action, ok); err != nil { return err } } if v.ExcludedRules != nil { ok := object.Key("ExcludedRules") if err := awsAwsjson11_serializeDocumentExcludedRules(v.ExcludedRules, ok); err != nil { return err } } if v.OverrideAction != nil { ok := object.Key("OverrideAction") if err := awsAwsjson11_serializeDocumentWafOverrideAction(v.OverrideAction, ok); err != nil { return err } } if v.Priority != nil { ok := object.Key("Priority") ok.Integer(*v.Priority) } if v.RuleId != nil { ok := object.Key("RuleId") ok.String(*v.RuleId) } if len(v.Type) > 0 { ok := object.Key("Type") ok.String(string(v.Type)) } return nil } func awsAwsjson11_serializeDocumentByteMatchSetUpdate(v *types.ByteMatchSetUpdate, value smithyjson.Value) error { object := value.Object() defer object.Close() if len(v.Action) > 0 { ok := object.Key("Action") ok.String(string(v.Action)) } if v.ByteMatchTuple != nil { ok := object.Key("ByteMatchTuple") if err := awsAwsjson11_serializeDocumentByteMatchTuple(v.ByteMatchTuple, ok); err != nil { return err } } return nil } func awsAwsjson11_serializeDocumentByteMatchSetUpdates(v []types.ByteMatchSetUpdate, value smithyjson.Value) error { array := value.Array() defer array.Close() for i := range v { av := array.Value() if err := awsAwsjson11_serializeDocumentByteMatchSetUpdate(&v[i], av); err != nil { return err } } return nil } func awsAwsjson11_serializeDocumentByteMatchTuple(v *types.ByteMatchTuple, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.FieldToMatch != nil { ok := object.Key("FieldToMatch") if err := awsAwsjson11_serializeDocumentFieldToMatch(v.FieldToMatch, ok); err != nil { return err } } if len(v.PositionalConstraint) > 0 { ok := object.Key("PositionalConstraint") ok.String(string(v.PositionalConstraint)) } if v.TargetString != nil { ok := object.Key("TargetString") ok.Base64EncodeBytes(v.TargetString) } if len(v.TextTransformation) > 0 { ok := object.Key("TextTransformation") ok.String(string(v.TextTransformation)) } return nil } func awsAwsjson11_serializeDocumentExcludedRule(v *types.ExcludedRule, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.RuleId != nil { ok := object.Key("RuleId") ok.String(*v.RuleId) } return nil } func awsAwsjson11_serializeDocumentExcludedRules(v []types.ExcludedRule, value smithyjson.Value) error { array := value.Array() defer array.Close() for i := range v { av := array.Value() if err := awsAwsjson11_serializeDocumentExcludedRule(&v[i], av); err != nil { return err } } return nil } func awsAwsjson11_serializeDocumentFieldToMatch(v *types.FieldToMatch, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.Data != nil { ok := object.Key("Data") ok.String(*v.Data) } if len(v.Type) > 0 { ok := object.Key("Type") ok.String(string(v.Type)) } return nil } func awsAwsjson11_serializeDocumentGeoMatchConstraint(v *types.GeoMatchConstraint, value smithyjson.Value) error { object := value.Object() defer object.Close() if len(v.Type) > 0 { ok := object.Key("Type") ok.String(string(v.Type)) } if len(v.Value) > 0 { ok := object.Key("Value") ok.String(string(v.Value)) } return nil } func awsAwsjson11_serializeDocumentGeoMatchSetUpdate(v *types.GeoMatchSetUpdate, value smithyjson.Value) error { object := value.Object() defer object.Close() if len(v.Action) > 0 { ok := object.Key("Action") ok.String(string(v.Action)) } if v.GeoMatchConstraint != nil { ok := object.Key("GeoMatchConstraint") if err := awsAwsjson11_serializeDocumentGeoMatchConstraint(v.GeoMatchConstraint, ok); err != nil { return err } } return nil } func awsAwsjson11_serializeDocumentGeoMatchSetUpdates(v []types.GeoMatchSetUpdate, value smithyjson.Value) error { array := value.Array() defer array.Close() for i := range v { av := array.Value() if err := awsAwsjson11_serializeDocumentGeoMatchSetUpdate(&v[i], av); err != nil { return err } } return nil } func awsAwsjson11_serializeDocumentIPSetDescriptor(v *types.IPSetDescriptor, value smithyjson.Value) error { object := value.Object() defer object.Close() if len(v.Type) > 0 { ok := object.Key("Type") ok.String(string(v.Type)) } if v.Value != nil { ok := object.Key("Value") ok.String(*v.Value) } return nil } func awsAwsjson11_serializeDocumentIPSetUpdate(v *types.IPSetUpdate, value smithyjson.Value) error { object := value.Object() defer object.Close() if len(v.Action) > 0 { ok := object.Key("Action") ok.String(string(v.Action)) } if v.IPSetDescriptor != nil { ok := object.Key("IPSetDescriptor") if err := awsAwsjson11_serializeDocumentIPSetDescriptor(v.IPSetDescriptor, ok); err != nil { return err } } return nil } func awsAwsjson11_serializeDocumentIPSetUpdates(v []types.IPSetUpdate, value smithyjson.Value) error { array := value.Array() defer array.Close() for i := range v { av := array.Value() if err := awsAwsjson11_serializeDocumentIPSetUpdate(&v[i], av); err != nil { return err } } return nil } func awsAwsjson11_serializeDocumentLogDestinationConfigs(v []string, value smithyjson.Value) error { array := value.Array() defer array.Close() for i := range v { av := array.Value() av.String(v[i]) } return nil } func awsAwsjson11_serializeDocumentLoggingConfiguration(v *types.LoggingConfiguration, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.LogDestinationConfigs != nil { ok := object.Key("LogDestinationConfigs") if err := awsAwsjson11_serializeDocumentLogDestinationConfigs(v.LogDestinationConfigs, ok); err != nil { return err } } if v.RedactedFields != nil { ok := object.Key("RedactedFields") if err := awsAwsjson11_serializeDocumentRedactedFields(v.RedactedFields, ok); err != nil { return err } } if v.ResourceArn != nil { ok := object.Key("ResourceArn") ok.String(*v.ResourceArn) } return nil } func awsAwsjson11_serializeDocumentPredicate(v *types.Predicate, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.DataId != nil { ok := object.Key("DataId") ok.String(*v.DataId) } if v.Negated != nil { ok := object.Key("Negated") ok.Boolean(*v.Negated) } if len(v.Type) > 0 { ok := object.Key("Type") ok.String(string(v.Type)) } return nil } func awsAwsjson11_serializeDocumentRedactedFields(v []types.FieldToMatch, value smithyjson.Value) error { array := value.Array() defer array.Close() for i := range v { av := array.Value() if err := awsAwsjson11_serializeDocumentFieldToMatch(&v[i], av); err != nil { return err } } return nil } func awsAwsjson11_serializeDocumentRegexMatchSetUpdate(v *types.RegexMatchSetUpdate, value smithyjson.Value) error { object := value.Object() defer object.Close() if len(v.Action) > 0 { ok := object.Key("Action") ok.String(string(v.Action)) } if v.RegexMatchTuple != nil { ok := object.Key("RegexMatchTuple") if err := awsAwsjson11_serializeDocumentRegexMatchTuple(v.RegexMatchTuple, ok); err != nil { return err } } return nil } func awsAwsjson11_serializeDocumentRegexMatchSetUpdates(v []types.RegexMatchSetUpdate, value smithyjson.Value) error { array := value.Array() defer array.Close() for i := range v { av := array.Value() if err := awsAwsjson11_serializeDocumentRegexMatchSetUpdate(&v[i], av); err != nil { return err } } return nil } func awsAwsjson11_serializeDocumentRegexMatchTuple(v *types.RegexMatchTuple, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.FieldToMatch != nil { ok := object.Key("FieldToMatch") if err := awsAwsjson11_serializeDocumentFieldToMatch(v.FieldToMatch, ok); err != nil { return err } } if v.RegexPatternSetId != nil { ok := object.Key("RegexPatternSetId") ok.String(*v.RegexPatternSetId) } if len(v.TextTransformation) > 0 { ok := object.Key("TextTransformation") ok.String(string(v.TextTransformation)) } return nil } func awsAwsjson11_serializeDocumentRegexPatternSetUpdate(v *types.RegexPatternSetUpdate, value smithyjson.Value) error { object := value.Object() defer object.Close() if len(v.Action) > 0 { ok := object.Key("Action") ok.String(string(v.Action)) } if v.RegexPatternString != nil { ok := object.Key("RegexPatternString") ok.String(*v.RegexPatternString) } return nil } func awsAwsjson11_serializeDocumentRegexPatternSetUpdates(v []types.RegexPatternSetUpdate, value smithyjson.Value) error { array := value.Array() defer array.Close() for i := range v { av := array.Value() if err := awsAwsjson11_serializeDocumentRegexPatternSetUpdate(&v[i], av); err != nil { return err } } return nil } func awsAwsjson11_serializeDocumentRuleGroupUpdate(v *types.RuleGroupUpdate, value smithyjson.Value) error { object := value.Object() defer object.Close() if len(v.Action) > 0 { ok := object.Key("Action") ok.String(string(v.Action)) } if v.ActivatedRule != nil { ok := object.Key("ActivatedRule") if err := awsAwsjson11_serializeDocumentActivatedRule(v.ActivatedRule, ok); err != nil { return err } } return nil } func awsAwsjson11_serializeDocumentRuleGroupUpdates(v []types.RuleGroupUpdate, value smithyjson.Value) error { array := value.Array() defer array.Close() for i := range v { av := array.Value() if err := awsAwsjson11_serializeDocumentRuleGroupUpdate(&v[i], av); err != nil { return err } } return nil } func awsAwsjson11_serializeDocumentRuleUpdate(v *types.RuleUpdate, value smithyjson.Value) error { object := value.Object() defer object.Close() if len(v.Action) > 0 { ok := object.Key("Action") ok.String(string(v.Action)) } if v.Predicate != nil { ok := object.Key("Predicate") if err := awsAwsjson11_serializeDocumentPredicate(v.Predicate, ok); err != nil { return err } } return nil } func awsAwsjson11_serializeDocumentRuleUpdates(v []types.RuleUpdate, value smithyjson.Value) error { array := value.Array() defer array.Close() for i := range v { av := array.Value() if err := awsAwsjson11_serializeDocumentRuleUpdate(&v[i], av); err != nil { return err } } return nil } func awsAwsjson11_serializeDocumentSizeConstraint(v *types.SizeConstraint, value smithyjson.Value) error { object := value.Object() defer object.Close() if len(v.ComparisonOperator) > 0 { ok := object.Key("ComparisonOperator") ok.String(string(v.ComparisonOperator)) } if v.FieldToMatch != nil { ok := object.Key("FieldToMatch") if err := awsAwsjson11_serializeDocumentFieldToMatch(v.FieldToMatch, ok); err != nil { return err } } { ok := object.Key("Size") ok.Long(v.Size) } if len(v.TextTransformation) > 0 { ok := object.Key("TextTransformation") ok.String(string(v.TextTransformation)) } return nil } func awsAwsjson11_serializeDocumentSizeConstraintSetUpdate(v *types.SizeConstraintSetUpdate, value smithyjson.Value) error { object := value.Object() defer object.Close() if len(v.Action) > 0 { ok := object.Key("Action") ok.String(string(v.Action)) } if v.SizeConstraint != nil { ok := object.Key("SizeConstraint") if err := awsAwsjson11_serializeDocumentSizeConstraint(v.SizeConstraint, ok); err != nil { return err } } return nil } func awsAwsjson11_serializeDocumentSizeConstraintSetUpdates(v []types.SizeConstraintSetUpdate, value smithyjson.Value) error { array := value.Array() defer array.Close() for i := range v { av := array.Value() if err := awsAwsjson11_serializeDocumentSizeConstraintSetUpdate(&v[i], av); err != nil { return err } } return nil } func awsAwsjson11_serializeDocumentSqlInjectionMatchSetUpdate(v *types.SqlInjectionMatchSetUpdate, value smithyjson.Value) error { object := value.Object() defer object.Close() if len(v.Action) > 0 { ok := object.Key("Action") ok.String(string(v.Action)) } if v.SqlInjectionMatchTuple != nil { ok := object.Key("SqlInjectionMatchTuple") if err := awsAwsjson11_serializeDocumentSqlInjectionMatchTuple(v.SqlInjectionMatchTuple, ok); err != nil { return err } } return nil } func awsAwsjson11_serializeDocumentSqlInjectionMatchSetUpdates(v []types.SqlInjectionMatchSetUpdate, value smithyjson.Value) error { array := value.Array() defer array.Close() for i := range v { av := array.Value() if err := awsAwsjson11_serializeDocumentSqlInjectionMatchSetUpdate(&v[i], av); err != nil { return err } } return nil } func awsAwsjson11_serializeDocumentSqlInjectionMatchTuple(v *types.SqlInjectionMatchTuple, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.FieldToMatch != nil { ok := object.Key("FieldToMatch") if err := awsAwsjson11_serializeDocumentFieldToMatch(v.FieldToMatch, ok); err != nil { return err } } if len(v.TextTransformation) > 0 { ok := object.Key("TextTransformation") ok.String(string(v.TextTransformation)) } return nil } func awsAwsjson11_serializeDocumentTag(v *types.Tag, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.Key != nil { ok := object.Key("Key") ok.String(*v.Key) } if v.Value != nil { ok := object.Key("Value") ok.String(*v.Value) } return nil } func awsAwsjson11_serializeDocumentTagKeyList(v []string, value smithyjson.Value) error { array := value.Array() defer array.Close() for i := range v { av := array.Value() av.String(v[i]) } return nil } func awsAwsjson11_serializeDocumentTagList(v []types.Tag, value smithyjson.Value) error { array := value.Array() defer array.Close() for i := range v { av := array.Value() if err := awsAwsjson11_serializeDocumentTag(&v[i], av); err != nil { return err } } return nil } func awsAwsjson11_serializeDocumentTimeWindow(v *types.TimeWindow, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.EndTime != nil { ok := object.Key("EndTime") ok.Double(smithytime.FormatEpochSeconds(*v.EndTime)) } if v.StartTime != nil { ok := object.Key("StartTime") ok.Double(smithytime.FormatEpochSeconds(*v.StartTime)) } return nil } func awsAwsjson11_serializeDocumentWafAction(v *types.WafAction, value smithyjson.Value) error { object := value.Object() defer object.Close() if len(v.Type) > 0 { ok := object.Key("Type") ok.String(string(v.Type)) } return nil } func awsAwsjson11_serializeDocumentWafOverrideAction(v *types.WafOverrideAction, value smithyjson.Value) error { object := value.Object() defer object.Close() if len(v.Type) > 0 { ok := object.Key("Type") ok.String(string(v.Type)) } return nil } func awsAwsjson11_serializeDocumentWebACLUpdate(v *types.WebACLUpdate, value smithyjson.Value) error { object := value.Object() defer object.Close() if len(v.Action) > 0 { ok := object.Key("Action") ok.String(string(v.Action)) } if v.ActivatedRule != nil { ok := object.Key("ActivatedRule") if err := awsAwsjson11_serializeDocumentActivatedRule(v.ActivatedRule, ok); err != nil { return err } } return nil } func awsAwsjson11_serializeDocumentWebACLUpdates(v []types.WebACLUpdate, value smithyjson.Value) error { array := value.Array() defer array.Close() for i := range v { av := array.Value() if err := awsAwsjson11_serializeDocumentWebACLUpdate(&v[i], av); err != nil { return err } } return nil } func awsAwsjson11_serializeDocumentXssMatchSetUpdate(v *types.XssMatchSetUpdate, value smithyjson.Value) error { object := value.Object() defer object.Close() if len(v.Action) > 0 { ok := object.Key("Action") ok.String(string(v.Action)) } if v.XssMatchTuple != nil { ok := object.Key("XssMatchTuple") if err := awsAwsjson11_serializeDocumentXssMatchTuple(v.XssMatchTuple, ok); err != nil { return err } } return nil } func awsAwsjson11_serializeDocumentXssMatchSetUpdates(v []types.XssMatchSetUpdate, value smithyjson.Value) error { array := value.Array() defer array.Close() for i := range v { av := array.Value() if err := awsAwsjson11_serializeDocumentXssMatchSetUpdate(&v[i], av); err != nil { return err } } return nil } func awsAwsjson11_serializeDocumentXssMatchTuple(v *types.XssMatchTuple, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.FieldToMatch != nil { ok := object.Key("FieldToMatch") if err := awsAwsjson11_serializeDocumentFieldToMatch(v.FieldToMatch, ok); err != nil { return err } } if len(v.TextTransformation) > 0 { ok := object.Key("TextTransformation") ok.String(string(v.TextTransformation)) } return nil } func awsAwsjson11_serializeOpDocumentCreateByteMatchSetInput(v *CreateByteMatchSetInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.ChangeToken != nil { ok := object.Key("ChangeToken") ok.String(*v.ChangeToken) } if v.Name != nil { ok := object.Key("Name") ok.String(*v.Name) } return nil } func awsAwsjson11_serializeOpDocumentCreateGeoMatchSetInput(v *CreateGeoMatchSetInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.ChangeToken != nil { ok := object.Key("ChangeToken") ok.String(*v.ChangeToken) } if v.Name != nil { ok := object.Key("Name") ok.String(*v.Name) } return nil } func awsAwsjson11_serializeOpDocumentCreateIPSetInput(v *CreateIPSetInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.ChangeToken != nil { ok := object.Key("ChangeToken") ok.String(*v.ChangeToken) } if v.Name != nil { ok := object.Key("Name") ok.String(*v.Name) } return nil } func awsAwsjson11_serializeOpDocumentCreateRateBasedRuleInput(v *CreateRateBasedRuleInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.ChangeToken != nil { ok := object.Key("ChangeToken") ok.String(*v.ChangeToken) } if v.MetricName != nil { ok := object.Key("MetricName") ok.String(*v.MetricName) } if v.Name != nil { ok := object.Key("Name") ok.String(*v.Name) } if len(v.RateKey) > 0 { ok := object.Key("RateKey") ok.String(string(v.RateKey)) } { ok := object.Key("RateLimit") ok.Long(v.RateLimit) } if v.Tags != nil { ok := object.Key("Tags") if err := awsAwsjson11_serializeDocumentTagList(v.Tags, ok); err != nil { return err } } return nil } func awsAwsjson11_serializeOpDocumentCreateRegexMatchSetInput(v *CreateRegexMatchSetInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.ChangeToken != nil { ok := object.Key("ChangeToken") ok.String(*v.ChangeToken) } if v.Name != nil { ok := object.Key("Name") ok.String(*v.Name) } return nil } func awsAwsjson11_serializeOpDocumentCreateRegexPatternSetInput(v *CreateRegexPatternSetInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.ChangeToken != nil { ok := object.Key("ChangeToken") ok.String(*v.ChangeToken) } if v.Name != nil { ok := object.Key("Name") ok.String(*v.Name) } return nil } func awsAwsjson11_serializeOpDocumentCreateRuleGroupInput(v *CreateRuleGroupInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.ChangeToken != nil { ok := object.Key("ChangeToken") ok.String(*v.ChangeToken) } if v.MetricName != nil { ok := object.Key("MetricName") ok.String(*v.MetricName) } if v.Name != nil { ok := object.Key("Name") ok.String(*v.Name) } if v.Tags != nil { ok := object.Key("Tags") if err := awsAwsjson11_serializeDocumentTagList(v.Tags, ok); err != nil { return err } } return nil } func awsAwsjson11_serializeOpDocumentCreateRuleInput(v *CreateRuleInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.ChangeToken != nil { ok := object.Key("ChangeToken") ok.String(*v.ChangeToken) } if v.MetricName != nil { ok := object.Key("MetricName") ok.String(*v.MetricName) } if v.Name != nil { ok := object.Key("Name") ok.String(*v.Name) } if v.Tags != nil { ok := object.Key("Tags") if err := awsAwsjson11_serializeDocumentTagList(v.Tags, ok); err != nil { return err } } return nil } func awsAwsjson11_serializeOpDocumentCreateSizeConstraintSetInput(v *CreateSizeConstraintSetInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.ChangeToken != nil { ok := object.Key("ChangeToken") ok.String(*v.ChangeToken) } if v.Name != nil { ok := object.Key("Name") ok.String(*v.Name) } return nil } func awsAwsjson11_serializeOpDocumentCreateSqlInjectionMatchSetInput(v *CreateSqlInjectionMatchSetInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.ChangeToken != nil { ok := object.Key("ChangeToken") ok.String(*v.ChangeToken) } if v.Name != nil { ok := object.Key("Name") ok.String(*v.Name) } return nil } func awsAwsjson11_serializeOpDocumentCreateWebACLInput(v *CreateWebACLInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.ChangeToken != nil { ok := object.Key("ChangeToken") ok.String(*v.ChangeToken) } if v.DefaultAction != nil { ok := object.Key("DefaultAction") if err := awsAwsjson11_serializeDocumentWafAction(v.DefaultAction, ok); err != nil { return err } } if v.MetricName != nil { ok := object.Key("MetricName") ok.String(*v.MetricName) } if v.Name != nil { ok := object.Key("Name") ok.String(*v.Name) } if v.Tags != nil { ok := object.Key("Tags") if err := awsAwsjson11_serializeDocumentTagList(v.Tags, ok); err != nil { return err } } return nil } func awsAwsjson11_serializeOpDocumentCreateWebACLMigrationStackInput(v *CreateWebACLMigrationStackInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.IgnoreUnsupportedType != nil { ok := object.Key("IgnoreUnsupportedType") ok.Boolean(*v.IgnoreUnsupportedType) } if v.S3BucketName != nil { ok := object.Key("S3BucketName") ok.String(*v.S3BucketName) } if v.WebACLId != nil { ok := object.Key("WebACLId") ok.String(*v.WebACLId) } return nil } func awsAwsjson11_serializeOpDocumentCreateXssMatchSetInput(v *CreateXssMatchSetInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.ChangeToken != nil { ok := object.Key("ChangeToken") ok.String(*v.ChangeToken) } if v.Name != nil { ok := object.Key("Name") ok.String(*v.Name) } return nil } func awsAwsjson11_serializeOpDocumentDeleteByteMatchSetInput(v *DeleteByteMatchSetInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.ByteMatchSetId != nil { ok := object.Key("ByteMatchSetId") ok.String(*v.ByteMatchSetId) } if v.ChangeToken != nil { ok := object.Key("ChangeToken") ok.String(*v.ChangeToken) } return nil } func awsAwsjson11_serializeOpDocumentDeleteGeoMatchSetInput(v *DeleteGeoMatchSetInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.ChangeToken != nil { ok := object.Key("ChangeToken") ok.String(*v.ChangeToken) } if v.GeoMatchSetId != nil { ok := object.Key("GeoMatchSetId") ok.String(*v.GeoMatchSetId) } return nil } func awsAwsjson11_serializeOpDocumentDeleteIPSetInput(v *DeleteIPSetInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.ChangeToken != nil { ok := object.Key("ChangeToken") ok.String(*v.ChangeToken) } if v.IPSetId != nil { ok := object.Key("IPSetId") ok.String(*v.IPSetId) } return nil } func awsAwsjson11_serializeOpDocumentDeleteLoggingConfigurationInput(v *DeleteLoggingConfigurationInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.ResourceArn != nil { ok := object.Key("ResourceArn") ok.String(*v.ResourceArn) } return nil } func awsAwsjson11_serializeOpDocumentDeletePermissionPolicyInput(v *DeletePermissionPolicyInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.ResourceArn != nil { ok := object.Key("ResourceArn") ok.String(*v.ResourceArn) } return nil } func awsAwsjson11_serializeOpDocumentDeleteRateBasedRuleInput(v *DeleteRateBasedRuleInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.ChangeToken != nil { ok := object.Key("ChangeToken") ok.String(*v.ChangeToken) } if v.RuleId != nil { ok := object.Key("RuleId") ok.String(*v.RuleId) } return nil } func awsAwsjson11_serializeOpDocumentDeleteRegexMatchSetInput(v *DeleteRegexMatchSetInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.ChangeToken != nil { ok := object.Key("ChangeToken") ok.String(*v.ChangeToken) } if v.RegexMatchSetId != nil { ok := object.Key("RegexMatchSetId") ok.String(*v.RegexMatchSetId) } return nil } func awsAwsjson11_serializeOpDocumentDeleteRegexPatternSetInput(v *DeleteRegexPatternSetInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.ChangeToken != nil { ok := object.Key("ChangeToken") ok.String(*v.ChangeToken) } if v.RegexPatternSetId != nil { ok := object.Key("RegexPatternSetId") ok.String(*v.RegexPatternSetId) } return nil } func awsAwsjson11_serializeOpDocumentDeleteRuleGroupInput(v *DeleteRuleGroupInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.ChangeToken != nil { ok := object.Key("ChangeToken") ok.String(*v.ChangeToken) } if v.RuleGroupId != nil { ok := object.Key("RuleGroupId") ok.String(*v.RuleGroupId) } return nil } func awsAwsjson11_serializeOpDocumentDeleteRuleInput(v *DeleteRuleInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.ChangeToken != nil { ok := object.Key("ChangeToken") ok.String(*v.ChangeToken) } if v.RuleId != nil { ok := object.Key("RuleId") ok.String(*v.RuleId) } return nil } func awsAwsjson11_serializeOpDocumentDeleteSizeConstraintSetInput(v *DeleteSizeConstraintSetInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.ChangeToken != nil { ok := object.Key("ChangeToken") ok.String(*v.ChangeToken) } if v.SizeConstraintSetId != nil { ok := object.Key("SizeConstraintSetId") ok.String(*v.SizeConstraintSetId) } return nil } func awsAwsjson11_serializeOpDocumentDeleteSqlInjectionMatchSetInput(v *DeleteSqlInjectionMatchSetInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.ChangeToken != nil { ok := object.Key("ChangeToken") ok.String(*v.ChangeToken) } if v.SqlInjectionMatchSetId != nil { ok := object.Key("SqlInjectionMatchSetId") ok.String(*v.SqlInjectionMatchSetId) } return nil } func awsAwsjson11_serializeOpDocumentDeleteWebACLInput(v *DeleteWebACLInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.ChangeToken != nil { ok := object.Key("ChangeToken") ok.String(*v.ChangeToken) } if v.WebACLId != nil { ok := object.Key("WebACLId") ok.String(*v.WebACLId) } return nil } func awsAwsjson11_serializeOpDocumentDeleteXssMatchSetInput(v *DeleteXssMatchSetInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.ChangeToken != nil { ok := object.Key("ChangeToken") ok.String(*v.ChangeToken) } if v.XssMatchSetId != nil { ok := object.Key("XssMatchSetId") ok.String(*v.XssMatchSetId) } return nil } func awsAwsjson11_serializeOpDocumentGetByteMatchSetInput(v *GetByteMatchSetInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.ByteMatchSetId != nil { ok := object.Key("ByteMatchSetId") ok.String(*v.ByteMatchSetId) } return nil } func awsAwsjson11_serializeOpDocumentGetChangeTokenInput(v *GetChangeTokenInput, value smithyjson.Value) error { object := value.Object() defer object.Close() return nil } func awsAwsjson11_serializeOpDocumentGetChangeTokenStatusInput(v *GetChangeTokenStatusInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.ChangeToken != nil { ok := object.Key("ChangeToken") ok.String(*v.ChangeToken) } return nil } func awsAwsjson11_serializeOpDocumentGetGeoMatchSetInput(v *GetGeoMatchSetInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.GeoMatchSetId != nil { ok := object.Key("GeoMatchSetId") ok.String(*v.GeoMatchSetId) } return nil } func awsAwsjson11_serializeOpDocumentGetIPSetInput(v *GetIPSetInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.IPSetId != nil { ok := object.Key("IPSetId") ok.String(*v.IPSetId) } return nil } func awsAwsjson11_serializeOpDocumentGetLoggingConfigurationInput(v *GetLoggingConfigurationInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.ResourceArn != nil { ok := object.Key("ResourceArn") ok.String(*v.ResourceArn) } return nil } func awsAwsjson11_serializeOpDocumentGetPermissionPolicyInput(v *GetPermissionPolicyInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.ResourceArn != nil { ok := object.Key("ResourceArn") ok.String(*v.ResourceArn) } return nil } func awsAwsjson11_serializeOpDocumentGetRateBasedRuleInput(v *GetRateBasedRuleInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.RuleId != nil { ok := object.Key("RuleId") ok.String(*v.RuleId) } return nil } func awsAwsjson11_serializeOpDocumentGetRateBasedRuleManagedKeysInput(v *GetRateBasedRuleManagedKeysInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.NextMarker != nil { ok := object.Key("NextMarker") ok.String(*v.NextMarker) } if v.RuleId != nil { ok := object.Key("RuleId") ok.String(*v.RuleId) } return nil } func awsAwsjson11_serializeOpDocumentGetRegexMatchSetInput(v *GetRegexMatchSetInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.RegexMatchSetId != nil { ok := object.Key("RegexMatchSetId") ok.String(*v.RegexMatchSetId) } return nil } func awsAwsjson11_serializeOpDocumentGetRegexPatternSetInput(v *GetRegexPatternSetInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.RegexPatternSetId != nil { ok := object.Key("RegexPatternSetId") ok.String(*v.RegexPatternSetId) } return nil } func awsAwsjson11_serializeOpDocumentGetRuleGroupInput(v *GetRuleGroupInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.RuleGroupId != nil { ok := object.Key("RuleGroupId") ok.String(*v.RuleGroupId) } return nil } func awsAwsjson11_serializeOpDocumentGetRuleInput(v *GetRuleInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.RuleId != nil { ok := object.Key("RuleId") ok.String(*v.RuleId) } return nil } func awsAwsjson11_serializeOpDocumentGetSampledRequestsInput(v *GetSampledRequestsInput, value smithyjson.Value) error { object := value.Object() defer object.Close() { ok := object.Key("MaxItems") ok.Long(v.MaxItems) } if v.RuleId != nil { ok := object.Key("RuleId") ok.String(*v.RuleId) } if v.TimeWindow != nil { ok := object.Key("TimeWindow") if err := awsAwsjson11_serializeDocumentTimeWindow(v.TimeWindow, ok); err != nil { return err } } if v.WebAclId != nil { ok := object.Key("WebAclId") ok.String(*v.WebAclId) } return nil } func awsAwsjson11_serializeOpDocumentGetSizeConstraintSetInput(v *GetSizeConstraintSetInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.SizeConstraintSetId != nil { ok := object.Key("SizeConstraintSetId") ok.String(*v.SizeConstraintSetId) } return nil } func awsAwsjson11_serializeOpDocumentGetSqlInjectionMatchSetInput(v *GetSqlInjectionMatchSetInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.SqlInjectionMatchSetId != nil { ok := object.Key("SqlInjectionMatchSetId") ok.String(*v.SqlInjectionMatchSetId) } return nil } func awsAwsjson11_serializeOpDocumentGetWebACLInput(v *GetWebACLInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.WebACLId != nil { ok := object.Key("WebACLId") ok.String(*v.WebACLId) } return nil } func awsAwsjson11_serializeOpDocumentGetXssMatchSetInput(v *GetXssMatchSetInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.XssMatchSetId != nil { ok := object.Key("XssMatchSetId") ok.String(*v.XssMatchSetId) } return nil } func awsAwsjson11_serializeOpDocumentListActivatedRulesInRuleGroupInput(v *ListActivatedRulesInRuleGroupInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.Limit != 0 { ok := object.Key("Limit") ok.Integer(v.Limit) } if v.NextMarker != nil { ok := object.Key("NextMarker") ok.String(*v.NextMarker) } if v.RuleGroupId != nil { ok := object.Key("RuleGroupId") ok.String(*v.RuleGroupId) } return nil } func awsAwsjson11_serializeOpDocumentListByteMatchSetsInput(v *ListByteMatchSetsInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.Limit != 0 { ok := object.Key("Limit") ok.Integer(v.Limit) } if v.NextMarker != nil { ok := object.Key("NextMarker") ok.String(*v.NextMarker) } return nil } func awsAwsjson11_serializeOpDocumentListGeoMatchSetsInput(v *ListGeoMatchSetsInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.Limit != 0 { ok := object.Key("Limit") ok.Integer(v.Limit) } if v.NextMarker != nil { ok := object.Key("NextMarker") ok.String(*v.NextMarker) } return nil } func awsAwsjson11_serializeOpDocumentListIPSetsInput(v *ListIPSetsInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.Limit != 0 { ok := object.Key("Limit") ok.Integer(v.Limit) } if v.NextMarker != nil { ok := object.Key("NextMarker") ok.String(*v.NextMarker) } return nil } func awsAwsjson11_serializeOpDocumentListLoggingConfigurationsInput(v *ListLoggingConfigurationsInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.Limit != 0 { ok := object.Key("Limit") ok.Integer(v.Limit) } if v.NextMarker != nil { ok := object.Key("NextMarker") ok.String(*v.NextMarker) } return nil } func awsAwsjson11_serializeOpDocumentListRateBasedRulesInput(v *ListRateBasedRulesInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.Limit != 0 { ok := object.Key("Limit") ok.Integer(v.Limit) } if v.NextMarker != nil { ok := object.Key("NextMarker") ok.String(*v.NextMarker) } return nil } func awsAwsjson11_serializeOpDocumentListRegexMatchSetsInput(v *ListRegexMatchSetsInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.Limit != 0 { ok := object.Key("Limit") ok.Integer(v.Limit) } if v.NextMarker != nil { ok := object.Key("NextMarker") ok.String(*v.NextMarker) } return nil } func awsAwsjson11_serializeOpDocumentListRegexPatternSetsInput(v *ListRegexPatternSetsInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.Limit != 0 { ok := object.Key("Limit") ok.Integer(v.Limit) } if v.NextMarker != nil { ok := object.Key("NextMarker") ok.String(*v.NextMarker) } return nil } func awsAwsjson11_serializeOpDocumentListRuleGroupsInput(v *ListRuleGroupsInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.Limit != 0 { ok := object.Key("Limit") ok.Integer(v.Limit) } if v.NextMarker != nil { ok := object.Key("NextMarker") ok.String(*v.NextMarker) } return nil } func awsAwsjson11_serializeOpDocumentListRulesInput(v *ListRulesInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.Limit != 0 { ok := object.Key("Limit") ok.Integer(v.Limit) } if v.NextMarker != nil { ok := object.Key("NextMarker") ok.String(*v.NextMarker) } return nil } func awsAwsjson11_serializeOpDocumentListSizeConstraintSetsInput(v *ListSizeConstraintSetsInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.Limit != 0 { ok := object.Key("Limit") ok.Integer(v.Limit) } if v.NextMarker != nil { ok := object.Key("NextMarker") ok.String(*v.NextMarker) } return nil } func awsAwsjson11_serializeOpDocumentListSqlInjectionMatchSetsInput(v *ListSqlInjectionMatchSetsInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.Limit != 0 { ok := object.Key("Limit") ok.Integer(v.Limit) } if v.NextMarker != nil { ok := object.Key("NextMarker") ok.String(*v.NextMarker) } return nil } func awsAwsjson11_serializeOpDocumentListSubscribedRuleGroupsInput(v *ListSubscribedRuleGroupsInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.Limit != 0 { ok := object.Key("Limit") ok.Integer(v.Limit) } if v.NextMarker != nil { ok := object.Key("NextMarker") ok.String(*v.NextMarker) } return nil } func awsAwsjson11_serializeOpDocumentListTagsForResourceInput(v *ListTagsForResourceInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.Limit != 0 { ok := object.Key("Limit") ok.Integer(v.Limit) } if v.NextMarker != nil { ok := object.Key("NextMarker") ok.String(*v.NextMarker) } if v.ResourceARN != nil { ok := object.Key("ResourceARN") ok.String(*v.ResourceARN) } return nil } func awsAwsjson11_serializeOpDocumentListWebACLsInput(v *ListWebACLsInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.Limit != 0 { ok := object.Key("Limit") ok.Integer(v.Limit) } if v.NextMarker != nil { ok := object.Key("NextMarker") ok.String(*v.NextMarker) } return nil } func awsAwsjson11_serializeOpDocumentListXssMatchSetsInput(v *ListXssMatchSetsInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.Limit != 0 { ok := object.Key("Limit") ok.Integer(v.Limit) } if v.NextMarker != nil { ok := object.Key("NextMarker") ok.String(*v.NextMarker) } return nil } func awsAwsjson11_serializeOpDocumentPutLoggingConfigurationInput(v *PutLoggingConfigurationInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.LoggingConfiguration != nil { ok := object.Key("LoggingConfiguration") if err := awsAwsjson11_serializeDocumentLoggingConfiguration(v.LoggingConfiguration, ok); err != nil { return err } } return nil } func awsAwsjson11_serializeOpDocumentPutPermissionPolicyInput(v *PutPermissionPolicyInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.Policy != nil { ok := object.Key("Policy") ok.String(*v.Policy) } if v.ResourceArn != nil { ok := object.Key("ResourceArn") ok.String(*v.ResourceArn) } return nil } func awsAwsjson11_serializeOpDocumentTagResourceInput(v *TagResourceInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.ResourceARN != nil { ok := object.Key("ResourceARN") ok.String(*v.ResourceARN) } if v.Tags != nil { ok := object.Key("Tags") if err := awsAwsjson11_serializeDocumentTagList(v.Tags, ok); err != nil { return err } } return nil } func awsAwsjson11_serializeOpDocumentUntagResourceInput(v *UntagResourceInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.ResourceARN != nil { ok := object.Key("ResourceARN") ok.String(*v.ResourceARN) } if v.TagKeys != nil { ok := object.Key("TagKeys") if err := awsAwsjson11_serializeDocumentTagKeyList(v.TagKeys, ok); err != nil { return err } } return nil } func awsAwsjson11_serializeOpDocumentUpdateByteMatchSetInput(v *UpdateByteMatchSetInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.ByteMatchSetId != nil { ok := object.Key("ByteMatchSetId") ok.String(*v.ByteMatchSetId) } if v.ChangeToken != nil { ok := object.Key("ChangeToken") ok.String(*v.ChangeToken) } if v.Updates != nil { ok := object.Key("Updates") if err := awsAwsjson11_serializeDocumentByteMatchSetUpdates(v.Updates, ok); err != nil { return err } } return nil } func awsAwsjson11_serializeOpDocumentUpdateGeoMatchSetInput(v *UpdateGeoMatchSetInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.ChangeToken != nil { ok := object.Key("ChangeToken") ok.String(*v.ChangeToken) } if v.GeoMatchSetId != nil { ok := object.Key("GeoMatchSetId") ok.String(*v.GeoMatchSetId) } if v.Updates != nil { ok := object.Key("Updates") if err := awsAwsjson11_serializeDocumentGeoMatchSetUpdates(v.Updates, ok); err != nil { return err } } return nil } func awsAwsjson11_serializeOpDocumentUpdateIPSetInput(v *UpdateIPSetInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.ChangeToken != nil { ok := object.Key("ChangeToken") ok.String(*v.ChangeToken) } if v.IPSetId != nil { ok := object.Key("IPSetId") ok.String(*v.IPSetId) } if v.Updates != nil { ok := object.Key("Updates") if err := awsAwsjson11_serializeDocumentIPSetUpdates(v.Updates, ok); err != nil { return err } } return nil } func awsAwsjson11_serializeOpDocumentUpdateRateBasedRuleInput(v *UpdateRateBasedRuleInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.ChangeToken != nil { ok := object.Key("ChangeToken") ok.String(*v.ChangeToken) } { ok := object.Key("RateLimit") ok.Long(v.RateLimit) } if v.RuleId != nil { ok := object.Key("RuleId") ok.String(*v.RuleId) } if v.Updates != nil { ok := object.Key("Updates") if err := awsAwsjson11_serializeDocumentRuleUpdates(v.Updates, ok); err != nil { return err } } return nil } func awsAwsjson11_serializeOpDocumentUpdateRegexMatchSetInput(v *UpdateRegexMatchSetInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.ChangeToken != nil { ok := object.Key("ChangeToken") ok.String(*v.ChangeToken) } if v.RegexMatchSetId != nil { ok := object.Key("RegexMatchSetId") ok.String(*v.RegexMatchSetId) } if v.Updates != nil { ok := object.Key("Updates") if err := awsAwsjson11_serializeDocumentRegexMatchSetUpdates(v.Updates, ok); err != nil { return err } } return nil } func awsAwsjson11_serializeOpDocumentUpdateRegexPatternSetInput(v *UpdateRegexPatternSetInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.ChangeToken != nil { ok := object.Key("ChangeToken") ok.String(*v.ChangeToken) } if v.RegexPatternSetId != nil { ok := object.Key("RegexPatternSetId") ok.String(*v.RegexPatternSetId) } if v.Updates != nil { ok := object.Key("Updates") if err := awsAwsjson11_serializeDocumentRegexPatternSetUpdates(v.Updates, ok); err != nil { return err } } return nil } func awsAwsjson11_serializeOpDocumentUpdateRuleGroupInput(v *UpdateRuleGroupInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.ChangeToken != nil { ok := object.Key("ChangeToken") ok.String(*v.ChangeToken) } if v.RuleGroupId != nil { ok := object.Key("RuleGroupId") ok.String(*v.RuleGroupId) } if v.Updates != nil { ok := object.Key("Updates") if err := awsAwsjson11_serializeDocumentRuleGroupUpdates(v.Updates, ok); err != nil { return err } } return nil } func awsAwsjson11_serializeOpDocumentUpdateRuleInput(v *UpdateRuleInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.ChangeToken != nil { ok := object.Key("ChangeToken") ok.String(*v.ChangeToken) } if v.RuleId != nil { ok := object.Key("RuleId") ok.String(*v.RuleId) } if v.Updates != nil { ok := object.Key("Updates") if err := awsAwsjson11_serializeDocumentRuleUpdates(v.Updates, ok); err != nil { return err } } return nil } func awsAwsjson11_serializeOpDocumentUpdateSizeConstraintSetInput(v *UpdateSizeConstraintSetInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.ChangeToken != nil { ok := object.Key("ChangeToken") ok.String(*v.ChangeToken) } if v.SizeConstraintSetId != nil { ok := object.Key("SizeConstraintSetId") ok.String(*v.SizeConstraintSetId) } if v.Updates != nil { ok := object.Key("Updates") if err := awsAwsjson11_serializeDocumentSizeConstraintSetUpdates(v.Updates, ok); err != nil { return err } } return nil } func awsAwsjson11_serializeOpDocumentUpdateSqlInjectionMatchSetInput(v *UpdateSqlInjectionMatchSetInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.ChangeToken != nil { ok := object.Key("ChangeToken") ok.String(*v.ChangeToken) } if v.SqlInjectionMatchSetId != nil { ok := object.Key("SqlInjectionMatchSetId") ok.String(*v.SqlInjectionMatchSetId) } if v.Updates != nil { ok := object.Key("Updates") if err := awsAwsjson11_serializeDocumentSqlInjectionMatchSetUpdates(v.Updates, ok); err != nil { return err } } return nil } func awsAwsjson11_serializeOpDocumentUpdateWebACLInput(v *UpdateWebACLInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.ChangeToken != nil { ok := object.Key("ChangeToken") ok.String(*v.ChangeToken) } if v.DefaultAction != nil { ok := object.Key("DefaultAction") if err := awsAwsjson11_serializeDocumentWafAction(v.DefaultAction, ok); err != nil { return err } } if v.Updates != nil { ok := object.Key("Updates") if err := awsAwsjson11_serializeDocumentWebACLUpdates(v.Updates, ok); err != nil { return err } } if v.WebACLId != nil { ok := object.Key("WebACLId") ok.String(*v.WebACLId) } return nil } func awsAwsjson11_serializeOpDocumentUpdateXssMatchSetInput(v *UpdateXssMatchSetInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.ChangeToken != nil { ok := object.Key("ChangeToken") ok.String(*v.ChangeToken) } if v.Updates != nil { ok := object.Key("Updates") if err := awsAwsjson11_serializeDocumentXssMatchSetUpdates(v.Updates, ok); err != nil { return err } } if v.XssMatchSetId != nil { ok := object.Key("XssMatchSetId") ok.String(*v.XssMatchSetId) } return nil }
6,398
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package waf import ( "context" "fmt" "github.com/aws/aws-sdk-go-v2/service/waf/types" smithy "github.com/aws/smithy-go" "github.com/aws/smithy-go/middleware" ) type validateOpCreateByteMatchSet struct { } func (*validateOpCreateByteMatchSet) ID() string { return "OperationInputValidation" } func (m *validateOpCreateByteMatchSet) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*CreateByteMatchSetInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpCreateByteMatchSetInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpCreateGeoMatchSet struct { } func (*validateOpCreateGeoMatchSet) ID() string { return "OperationInputValidation" } func (m *validateOpCreateGeoMatchSet) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*CreateGeoMatchSetInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpCreateGeoMatchSetInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpCreateIPSet struct { } func (*validateOpCreateIPSet) ID() string { return "OperationInputValidation" } func (m *validateOpCreateIPSet) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*CreateIPSetInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpCreateIPSetInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpCreateRateBasedRule struct { } func (*validateOpCreateRateBasedRule) ID() string { return "OperationInputValidation" } func (m *validateOpCreateRateBasedRule) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*CreateRateBasedRuleInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpCreateRateBasedRuleInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpCreateRegexMatchSet struct { } func (*validateOpCreateRegexMatchSet) ID() string { return "OperationInputValidation" } func (m *validateOpCreateRegexMatchSet) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*CreateRegexMatchSetInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpCreateRegexMatchSetInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpCreateRegexPatternSet struct { } func (*validateOpCreateRegexPatternSet) ID() string { return "OperationInputValidation" } func (m *validateOpCreateRegexPatternSet) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*CreateRegexPatternSetInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpCreateRegexPatternSetInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpCreateRuleGroup struct { } func (*validateOpCreateRuleGroup) ID() string { return "OperationInputValidation" } func (m *validateOpCreateRuleGroup) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*CreateRuleGroupInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpCreateRuleGroupInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpCreateRule struct { } func (*validateOpCreateRule) ID() string { return "OperationInputValidation" } func (m *validateOpCreateRule) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*CreateRuleInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpCreateRuleInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpCreateSizeConstraintSet struct { } func (*validateOpCreateSizeConstraintSet) ID() string { return "OperationInputValidation" } func (m *validateOpCreateSizeConstraintSet) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*CreateSizeConstraintSetInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpCreateSizeConstraintSetInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpCreateSqlInjectionMatchSet struct { } func (*validateOpCreateSqlInjectionMatchSet) ID() string { return "OperationInputValidation" } func (m *validateOpCreateSqlInjectionMatchSet) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*CreateSqlInjectionMatchSetInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpCreateSqlInjectionMatchSetInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpCreateWebACL struct { } func (*validateOpCreateWebACL) ID() string { return "OperationInputValidation" } func (m *validateOpCreateWebACL) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*CreateWebACLInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpCreateWebACLInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpCreateWebACLMigrationStack struct { } func (*validateOpCreateWebACLMigrationStack) ID() string { return "OperationInputValidation" } func (m *validateOpCreateWebACLMigrationStack) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*CreateWebACLMigrationStackInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpCreateWebACLMigrationStackInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpCreateXssMatchSet struct { } func (*validateOpCreateXssMatchSet) ID() string { return "OperationInputValidation" } func (m *validateOpCreateXssMatchSet) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*CreateXssMatchSetInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpCreateXssMatchSetInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpDeleteByteMatchSet struct { } func (*validateOpDeleteByteMatchSet) ID() string { return "OperationInputValidation" } func (m *validateOpDeleteByteMatchSet) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*DeleteByteMatchSetInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpDeleteByteMatchSetInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpDeleteGeoMatchSet struct { } func (*validateOpDeleteGeoMatchSet) ID() string { return "OperationInputValidation" } func (m *validateOpDeleteGeoMatchSet) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*DeleteGeoMatchSetInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpDeleteGeoMatchSetInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpDeleteIPSet struct { } func (*validateOpDeleteIPSet) ID() string { return "OperationInputValidation" } func (m *validateOpDeleteIPSet) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*DeleteIPSetInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpDeleteIPSetInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpDeleteLoggingConfiguration struct { } func (*validateOpDeleteLoggingConfiguration) ID() string { return "OperationInputValidation" } func (m *validateOpDeleteLoggingConfiguration) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*DeleteLoggingConfigurationInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpDeleteLoggingConfigurationInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpDeletePermissionPolicy struct { } func (*validateOpDeletePermissionPolicy) ID() string { return "OperationInputValidation" } func (m *validateOpDeletePermissionPolicy) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*DeletePermissionPolicyInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpDeletePermissionPolicyInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpDeleteRateBasedRule struct { } func (*validateOpDeleteRateBasedRule) ID() string { return "OperationInputValidation" } func (m *validateOpDeleteRateBasedRule) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*DeleteRateBasedRuleInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpDeleteRateBasedRuleInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpDeleteRegexMatchSet struct { } func (*validateOpDeleteRegexMatchSet) ID() string { return "OperationInputValidation" } func (m *validateOpDeleteRegexMatchSet) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*DeleteRegexMatchSetInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpDeleteRegexMatchSetInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpDeleteRegexPatternSet struct { } func (*validateOpDeleteRegexPatternSet) ID() string { return "OperationInputValidation" } func (m *validateOpDeleteRegexPatternSet) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*DeleteRegexPatternSetInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpDeleteRegexPatternSetInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpDeleteRuleGroup struct { } func (*validateOpDeleteRuleGroup) ID() string { return "OperationInputValidation" } func (m *validateOpDeleteRuleGroup) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*DeleteRuleGroupInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpDeleteRuleGroupInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpDeleteRule struct { } func (*validateOpDeleteRule) ID() string { return "OperationInputValidation" } func (m *validateOpDeleteRule) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*DeleteRuleInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpDeleteRuleInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpDeleteSizeConstraintSet struct { } func (*validateOpDeleteSizeConstraintSet) ID() string { return "OperationInputValidation" } func (m *validateOpDeleteSizeConstraintSet) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*DeleteSizeConstraintSetInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpDeleteSizeConstraintSetInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpDeleteSqlInjectionMatchSet struct { } func (*validateOpDeleteSqlInjectionMatchSet) ID() string { return "OperationInputValidation" } func (m *validateOpDeleteSqlInjectionMatchSet) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*DeleteSqlInjectionMatchSetInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpDeleteSqlInjectionMatchSetInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpDeleteWebACL struct { } func (*validateOpDeleteWebACL) ID() string { return "OperationInputValidation" } func (m *validateOpDeleteWebACL) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*DeleteWebACLInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpDeleteWebACLInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpDeleteXssMatchSet struct { } func (*validateOpDeleteXssMatchSet) ID() string { return "OperationInputValidation" } func (m *validateOpDeleteXssMatchSet) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*DeleteXssMatchSetInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpDeleteXssMatchSetInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpGetByteMatchSet struct { } func (*validateOpGetByteMatchSet) ID() string { return "OperationInputValidation" } func (m *validateOpGetByteMatchSet) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*GetByteMatchSetInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpGetByteMatchSetInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpGetChangeTokenStatus struct { } func (*validateOpGetChangeTokenStatus) ID() string { return "OperationInputValidation" } func (m *validateOpGetChangeTokenStatus) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*GetChangeTokenStatusInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpGetChangeTokenStatusInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpGetGeoMatchSet struct { } func (*validateOpGetGeoMatchSet) ID() string { return "OperationInputValidation" } func (m *validateOpGetGeoMatchSet) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*GetGeoMatchSetInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpGetGeoMatchSetInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpGetIPSet struct { } func (*validateOpGetIPSet) ID() string { return "OperationInputValidation" } func (m *validateOpGetIPSet) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*GetIPSetInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpGetIPSetInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpGetLoggingConfiguration struct { } func (*validateOpGetLoggingConfiguration) ID() string { return "OperationInputValidation" } func (m *validateOpGetLoggingConfiguration) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*GetLoggingConfigurationInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpGetLoggingConfigurationInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpGetPermissionPolicy struct { } func (*validateOpGetPermissionPolicy) ID() string { return "OperationInputValidation" } func (m *validateOpGetPermissionPolicy) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*GetPermissionPolicyInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpGetPermissionPolicyInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpGetRateBasedRule struct { } func (*validateOpGetRateBasedRule) ID() string { return "OperationInputValidation" } func (m *validateOpGetRateBasedRule) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*GetRateBasedRuleInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpGetRateBasedRuleInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpGetRateBasedRuleManagedKeys struct { } func (*validateOpGetRateBasedRuleManagedKeys) ID() string { return "OperationInputValidation" } func (m *validateOpGetRateBasedRuleManagedKeys) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*GetRateBasedRuleManagedKeysInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpGetRateBasedRuleManagedKeysInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpGetRegexMatchSet struct { } func (*validateOpGetRegexMatchSet) ID() string { return "OperationInputValidation" } func (m *validateOpGetRegexMatchSet) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*GetRegexMatchSetInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpGetRegexMatchSetInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpGetRegexPatternSet struct { } func (*validateOpGetRegexPatternSet) ID() string { return "OperationInputValidation" } func (m *validateOpGetRegexPatternSet) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*GetRegexPatternSetInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpGetRegexPatternSetInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpGetRuleGroup struct { } func (*validateOpGetRuleGroup) ID() string { return "OperationInputValidation" } func (m *validateOpGetRuleGroup) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*GetRuleGroupInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpGetRuleGroupInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpGetRule struct { } func (*validateOpGetRule) ID() string { return "OperationInputValidation" } func (m *validateOpGetRule) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*GetRuleInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpGetRuleInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpGetSampledRequests struct { } func (*validateOpGetSampledRequests) ID() string { return "OperationInputValidation" } func (m *validateOpGetSampledRequests) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*GetSampledRequestsInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpGetSampledRequestsInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpGetSizeConstraintSet struct { } func (*validateOpGetSizeConstraintSet) ID() string { return "OperationInputValidation" } func (m *validateOpGetSizeConstraintSet) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*GetSizeConstraintSetInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpGetSizeConstraintSetInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpGetSqlInjectionMatchSet struct { } func (*validateOpGetSqlInjectionMatchSet) ID() string { return "OperationInputValidation" } func (m *validateOpGetSqlInjectionMatchSet) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*GetSqlInjectionMatchSetInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpGetSqlInjectionMatchSetInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpGetWebACL struct { } func (*validateOpGetWebACL) ID() string { return "OperationInputValidation" } func (m *validateOpGetWebACL) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*GetWebACLInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpGetWebACLInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpGetXssMatchSet struct { } func (*validateOpGetXssMatchSet) ID() string { return "OperationInputValidation" } func (m *validateOpGetXssMatchSet) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*GetXssMatchSetInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpGetXssMatchSetInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpListTagsForResource struct { } func (*validateOpListTagsForResource) ID() string { return "OperationInputValidation" } func (m *validateOpListTagsForResource) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*ListTagsForResourceInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpListTagsForResourceInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpPutLoggingConfiguration struct { } func (*validateOpPutLoggingConfiguration) ID() string { return "OperationInputValidation" } func (m *validateOpPutLoggingConfiguration) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*PutLoggingConfigurationInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpPutLoggingConfigurationInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpPutPermissionPolicy struct { } func (*validateOpPutPermissionPolicy) ID() string { return "OperationInputValidation" } func (m *validateOpPutPermissionPolicy) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*PutPermissionPolicyInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpPutPermissionPolicyInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpTagResource struct { } func (*validateOpTagResource) ID() string { return "OperationInputValidation" } func (m *validateOpTagResource) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*TagResourceInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpTagResourceInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpUntagResource struct { } func (*validateOpUntagResource) ID() string { return "OperationInputValidation" } func (m *validateOpUntagResource) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*UntagResourceInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpUntagResourceInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpUpdateByteMatchSet struct { } func (*validateOpUpdateByteMatchSet) ID() string { return "OperationInputValidation" } func (m *validateOpUpdateByteMatchSet) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*UpdateByteMatchSetInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpUpdateByteMatchSetInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpUpdateGeoMatchSet struct { } func (*validateOpUpdateGeoMatchSet) ID() string { return "OperationInputValidation" } func (m *validateOpUpdateGeoMatchSet) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*UpdateGeoMatchSetInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpUpdateGeoMatchSetInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpUpdateIPSet struct { } func (*validateOpUpdateIPSet) ID() string { return "OperationInputValidation" } func (m *validateOpUpdateIPSet) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*UpdateIPSetInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpUpdateIPSetInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpUpdateRateBasedRule struct { } func (*validateOpUpdateRateBasedRule) ID() string { return "OperationInputValidation" } func (m *validateOpUpdateRateBasedRule) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*UpdateRateBasedRuleInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpUpdateRateBasedRuleInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpUpdateRegexMatchSet struct { } func (*validateOpUpdateRegexMatchSet) ID() string { return "OperationInputValidation" } func (m *validateOpUpdateRegexMatchSet) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*UpdateRegexMatchSetInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpUpdateRegexMatchSetInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpUpdateRegexPatternSet struct { } func (*validateOpUpdateRegexPatternSet) ID() string { return "OperationInputValidation" } func (m *validateOpUpdateRegexPatternSet) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*UpdateRegexPatternSetInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpUpdateRegexPatternSetInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpUpdateRuleGroup struct { } func (*validateOpUpdateRuleGroup) ID() string { return "OperationInputValidation" } func (m *validateOpUpdateRuleGroup) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*UpdateRuleGroupInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpUpdateRuleGroupInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpUpdateRule struct { } func (*validateOpUpdateRule) ID() string { return "OperationInputValidation" } func (m *validateOpUpdateRule) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*UpdateRuleInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpUpdateRuleInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpUpdateSizeConstraintSet struct { } func (*validateOpUpdateSizeConstraintSet) ID() string { return "OperationInputValidation" } func (m *validateOpUpdateSizeConstraintSet) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*UpdateSizeConstraintSetInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpUpdateSizeConstraintSetInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpUpdateSqlInjectionMatchSet struct { } func (*validateOpUpdateSqlInjectionMatchSet) ID() string { return "OperationInputValidation" } func (m *validateOpUpdateSqlInjectionMatchSet) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*UpdateSqlInjectionMatchSetInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpUpdateSqlInjectionMatchSetInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpUpdateWebACL struct { } func (*validateOpUpdateWebACL) ID() string { return "OperationInputValidation" } func (m *validateOpUpdateWebACL) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*UpdateWebACLInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpUpdateWebACLInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpUpdateXssMatchSet struct { } func (*validateOpUpdateXssMatchSet) ID() string { return "OperationInputValidation" } func (m *validateOpUpdateXssMatchSet) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*UpdateXssMatchSetInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpUpdateXssMatchSetInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } func addOpCreateByteMatchSetValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpCreateByteMatchSet{}, middleware.After) } func addOpCreateGeoMatchSetValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpCreateGeoMatchSet{}, middleware.After) } func addOpCreateIPSetValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpCreateIPSet{}, middleware.After) } func addOpCreateRateBasedRuleValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpCreateRateBasedRule{}, middleware.After) } func addOpCreateRegexMatchSetValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpCreateRegexMatchSet{}, middleware.After) } func addOpCreateRegexPatternSetValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpCreateRegexPatternSet{}, middleware.After) } func addOpCreateRuleGroupValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpCreateRuleGroup{}, middleware.After) } func addOpCreateRuleValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpCreateRule{}, middleware.After) } func addOpCreateSizeConstraintSetValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpCreateSizeConstraintSet{}, middleware.After) } func addOpCreateSqlInjectionMatchSetValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpCreateSqlInjectionMatchSet{}, middleware.After) } func addOpCreateWebACLValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpCreateWebACL{}, middleware.After) } func addOpCreateWebACLMigrationStackValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpCreateWebACLMigrationStack{}, middleware.After) } func addOpCreateXssMatchSetValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpCreateXssMatchSet{}, middleware.After) } func addOpDeleteByteMatchSetValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpDeleteByteMatchSet{}, middleware.After) } func addOpDeleteGeoMatchSetValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpDeleteGeoMatchSet{}, middleware.After) } func addOpDeleteIPSetValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpDeleteIPSet{}, middleware.After) } func addOpDeleteLoggingConfigurationValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpDeleteLoggingConfiguration{}, middleware.After) } func addOpDeletePermissionPolicyValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpDeletePermissionPolicy{}, middleware.After) } func addOpDeleteRateBasedRuleValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpDeleteRateBasedRule{}, middleware.After) } func addOpDeleteRegexMatchSetValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpDeleteRegexMatchSet{}, middleware.After) } func addOpDeleteRegexPatternSetValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpDeleteRegexPatternSet{}, middleware.After) } func addOpDeleteRuleGroupValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpDeleteRuleGroup{}, middleware.After) } func addOpDeleteRuleValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpDeleteRule{}, middleware.After) } func addOpDeleteSizeConstraintSetValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpDeleteSizeConstraintSet{}, middleware.After) } func addOpDeleteSqlInjectionMatchSetValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpDeleteSqlInjectionMatchSet{}, middleware.After) } func addOpDeleteWebACLValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpDeleteWebACL{}, middleware.After) } func addOpDeleteXssMatchSetValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpDeleteXssMatchSet{}, middleware.After) } func addOpGetByteMatchSetValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpGetByteMatchSet{}, middleware.After) } func addOpGetChangeTokenStatusValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpGetChangeTokenStatus{}, middleware.After) } func addOpGetGeoMatchSetValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpGetGeoMatchSet{}, middleware.After) } func addOpGetIPSetValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpGetIPSet{}, middleware.After) } func addOpGetLoggingConfigurationValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpGetLoggingConfiguration{}, middleware.After) } func addOpGetPermissionPolicyValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpGetPermissionPolicy{}, middleware.After) } func addOpGetRateBasedRuleValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpGetRateBasedRule{}, middleware.After) } func addOpGetRateBasedRuleManagedKeysValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpGetRateBasedRuleManagedKeys{}, middleware.After) } func addOpGetRegexMatchSetValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpGetRegexMatchSet{}, middleware.After) } func addOpGetRegexPatternSetValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpGetRegexPatternSet{}, middleware.After) } func addOpGetRuleGroupValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpGetRuleGroup{}, middleware.After) } func addOpGetRuleValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpGetRule{}, middleware.After) } func addOpGetSampledRequestsValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpGetSampledRequests{}, middleware.After) } func addOpGetSizeConstraintSetValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpGetSizeConstraintSet{}, middleware.After) } func addOpGetSqlInjectionMatchSetValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpGetSqlInjectionMatchSet{}, middleware.After) } func addOpGetWebACLValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpGetWebACL{}, middleware.After) } func addOpGetXssMatchSetValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpGetXssMatchSet{}, middleware.After) } func addOpListTagsForResourceValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpListTagsForResource{}, middleware.After) } func addOpPutLoggingConfigurationValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpPutLoggingConfiguration{}, middleware.After) } func addOpPutPermissionPolicyValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpPutPermissionPolicy{}, middleware.After) } func addOpTagResourceValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpTagResource{}, middleware.After) } func addOpUntagResourceValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpUntagResource{}, middleware.After) } func addOpUpdateByteMatchSetValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpUpdateByteMatchSet{}, middleware.After) } func addOpUpdateGeoMatchSetValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpUpdateGeoMatchSet{}, middleware.After) } func addOpUpdateIPSetValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpUpdateIPSet{}, middleware.After) } func addOpUpdateRateBasedRuleValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpUpdateRateBasedRule{}, middleware.After) } func addOpUpdateRegexMatchSetValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpUpdateRegexMatchSet{}, middleware.After) } func addOpUpdateRegexPatternSetValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpUpdateRegexPatternSet{}, middleware.After) } func addOpUpdateRuleGroupValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpUpdateRuleGroup{}, middleware.After) } func addOpUpdateRuleValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpUpdateRule{}, middleware.After) } func addOpUpdateSizeConstraintSetValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpUpdateSizeConstraintSet{}, middleware.After) } func addOpUpdateSqlInjectionMatchSetValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpUpdateSqlInjectionMatchSet{}, middleware.After) } func addOpUpdateWebACLValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpUpdateWebACL{}, middleware.After) } func addOpUpdateXssMatchSetValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpUpdateXssMatchSet{}, middleware.After) } func validateActivatedRule(v *types.ActivatedRule) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "ActivatedRule"} if v.Priority == nil { invalidParams.Add(smithy.NewErrParamRequired("Priority")) } if v.RuleId == nil { invalidParams.Add(smithy.NewErrParamRequired("RuleId")) } if v.Action != nil { if err := validateWafAction(v.Action); err != nil { invalidParams.AddNested("Action", err.(smithy.InvalidParamsError)) } } if v.OverrideAction != nil { if err := validateWafOverrideAction(v.OverrideAction); err != nil { invalidParams.AddNested("OverrideAction", err.(smithy.InvalidParamsError)) } } if v.ExcludedRules != nil { if err := validateExcludedRules(v.ExcludedRules); err != nil { invalidParams.AddNested("ExcludedRules", err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateByteMatchSetUpdate(v *types.ByteMatchSetUpdate) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "ByteMatchSetUpdate"} if len(v.Action) == 0 { invalidParams.Add(smithy.NewErrParamRequired("Action")) } if v.ByteMatchTuple == nil { invalidParams.Add(smithy.NewErrParamRequired("ByteMatchTuple")) } else if v.ByteMatchTuple != nil { if err := validateByteMatchTuple(v.ByteMatchTuple); err != nil { invalidParams.AddNested("ByteMatchTuple", err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateByteMatchSetUpdates(v []types.ByteMatchSetUpdate) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "ByteMatchSetUpdates"} for i := range v { if err := validateByteMatchSetUpdate(&v[i]); err != nil { invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateByteMatchTuple(v *types.ByteMatchTuple) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "ByteMatchTuple"} if v.FieldToMatch == nil { invalidParams.Add(smithy.NewErrParamRequired("FieldToMatch")) } else if v.FieldToMatch != nil { if err := validateFieldToMatch(v.FieldToMatch); err != nil { invalidParams.AddNested("FieldToMatch", err.(smithy.InvalidParamsError)) } } if v.TargetString == nil { invalidParams.Add(smithy.NewErrParamRequired("TargetString")) } if len(v.TextTransformation) == 0 { invalidParams.Add(smithy.NewErrParamRequired("TextTransformation")) } if len(v.PositionalConstraint) == 0 { invalidParams.Add(smithy.NewErrParamRequired("PositionalConstraint")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateExcludedRule(v *types.ExcludedRule) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "ExcludedRule"} if v.RuleId == nil { invalidParams.Add(smithy.NewErrParamRequired("RuleId")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateExcludedRules(v []types.ExcludedRule) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "ExcludedRules"} for i := range v { if err := validateExcludedRule(&v[i]); err != nil { invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateFieldToMatch(v *types.FieldToMatch) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "FieldToMatch"} if len(v.Type) == 0 { invalidParams.Add(smithy.NewErrParamRequired("Type")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateGeoMatchConstraint(v *types.GeoMatchConstraint) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "GeoMatchConstraint"} if len(v.Type) == 0 { invalidParams.Add(smithy.NewErrParamRequired("Type")) } if len(v.Value) == 0 { invalidParams.Add(smithy.NewErrParamRequired("Value")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateGeoMatchSetUpdate(v *types.GeoMatchSetUpdate) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "GeoMatchSetUpdate"} if len(v.Action) == 0 { invalidParams.Add(smithy.NewErrParamRequired("Action")) } if v.GeoMatchConstraint == nil { invalidParams.Add(smithy.NewErrParamRequired("GeoMatchConstraint")) } else if v.GeoMatchConstraint != nil { if err := validateGeoMatchConstraint(v.GeoMatchConstraint); err != nil { invalidParams.AddNested("GeoMatchConstraint", err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateGeoMatchSetUpdates(v []types.GeoMatchSetUpdate) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "GeoMatchSetUpdates"} for i := range v { if err := validateGeoMatchSetUpdate(&v[i]); err != nil { invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateIPSetDescriptor(v *types.IPSetDescriptor) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "IPSetDescriptor"} if len(v.Type) == 0 { invalidParams.Add(smithy.NewErrParamRequired("Type")) } if v.Value == nil { invalidParams.Add(smithy.NewErrParamRequired("Value")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateIPSetUpdate(v *types.IPSetUpdate) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "IPSetUpdate"} if len(v.Action) == 0 { invalidParams.Add(smithy.NewErrParamRequired("Action")) } if v.IPSetDescriptor == nil { invalidParams.Add(smithy.NewErrParamRequired("IPSetDescriptor")) } else if v.IPSetDescriptor != nil { if err := validateIPSetDescriptor(v.IPSetDescriptor); err != nil { invalidParams.AddNested("IPSetDescriptor", err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateIPSetUpdates(v []types.IPSetUpdate) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "IPSetUpdates"} for i := range v { if err := validateIPSetUpdate(&v[i]); err != nil { invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateLoggingConfiguration(v *types.LoggingConfiguration) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "LoggingConfiguration"} if v.ResourceArn == nil { invalidParams.Add(smithy.NewErrParamRequired("ResourceArn")) } if v.LogDestinationConfigs == nil { invalidParams.Add(smithy.NewErrParamRequired("LogDestinationConfigs")) } if v.RedactedFields != nil { if err := validateRedactedFields(v.RedactedFields); err != nil { invalidParams.AddNested("RedactedFields", err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validatePredicate(v *types.Predicate) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "Predicate"} if v.Negated == nil { invalidParams.Add(smithy.NewErrParamRequired("Negated")) } if len(v.Type) == 0 { invalidParams.Add(smithy.NewErrParamRequired("Type")) } if v.DataId == nil { invalidParams.Add(smithy.NewErrParamRequired("DataId")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateRedactedFields(v []types.FieldToMatch) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "RedactedFields"} for i := range v { if err := validateFieldToMatch(&v[i]); err != nil { invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateRegexMatchSetUpdate(v *types.RegexMatchSetUpdate) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "RegexMatchSetUpdate"} if len(v.Action) == 0 { invalidParams.Add(smithy.NewErrParamRequired("Action")) } if v.RegexMatchTuple == nil { invalidParams.Add(smithy.NewErrParamRequired("RegexMatchTuple")) } else if v.RegexMatchTuple != nil { if err := validateRegexMatchTuple(v.RegexMatchTuple); err != nil { invalidParams.AddNested("RegexMatchTuple", err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateRegexMatchSetUpdates(v []types.RegexMatchSetUpdate) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "RegexMatchSetUpdates"} for i := range v { if err := validateRegexMatchSetUpdate(&v[i]); err != nil { invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateRegexMatchTuple(v *types.RegexMatchTuple) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "RegexMatchTuple"} if v.FieldToMatch == nil { invalidParams.Add(smithy.NewErrParamRequired("FieldToMatch")) } else if v.FieldToMatch != nil { if err := validateFieldToMatch(v.FieldToMatch); err != nil { invalidParams.AddNested("FieldToMatch", err.(smithy.InvalidParamsError)) } } if len(v.TextTransformation) == 0 { invalidParams.Add(smithy.NewErrParamRequired("TextTransformation")) } if v.RegexPatternSetId == nil { invalidParams.Add(smithy.NewErrParamRequired("RegexPatternSetId")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateRegexPatternSetUpdate(v *types.RegexPatternSetUpdate) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "RegexPatternSetUpdate"} if len(v.Action) == 0 { invalidParams.Add(smithy.NewErrParamRequired("Action")) } if v.RegexPatternString == nil { invalidParams.Add(smithy.NewErrParamRequired("RegexPatternString")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateRegexPatternSetUpdates(v []types.RegexPatternSetUpdate) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "RegexPatternSetUpdates"} for i := range v { if err := validateRegexPatternSetUpdate(&v[i]); err != nil { invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateRuleGroupUpdate(v *types.RuleGroupUpdate) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "RuleGroupUpdate"} if len(v.Action) == 0 { invalidParams.Add(smithy.NewErrParamRequired("Action")) } if v.ActivatedRule == nil { invalidParams.Add(smithy.NewErrParamRequired("ActivatedRule")) } else if v.ActivatedRule != nil { if err := validateActivatedRule(v.ActivatedRule); err != nil { invalidParams.AddNested("ActivatedRule", err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateRuleGroupUpdates(v []types.RuleGroupUpdate) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "RuleGroupUpdates"} for i := range v { if err := validateRuleGroupUpdate(&v[i]); err != nil { invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateRuleUpdate(v *types.RuleUpdate) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "RuleUpdate"} if len(v.Action) == 0 { invalidParams.Add(smithy.NewErrParamRequired("Action")) } if v.Predicate == nil { invalidParams.Add(smithy.NewErrParamRequired("Predicate")) } else if v.Predicate != nil { if err := validatePredicate(v.Predicate); err != nil { invalidParams.AddNested("Predicate", err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateRuleUpdates(v []types.RuleUpdate) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "RuleUpdates"} for i := range v { if err := validateRuleUpdate(&v[i]); err != nil { invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateSizeConstraint(v *types.SizeConstraint) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "SizeConstraint"} if v.FieldToMatch == nil { invalidParams.Add(smithy.NewErrParamRequired("FieldToMatch")) } else if v.FieldToMatch != nil { if err := validateFieldToMatch(v.FieldToMatch); err != nil { invalidParams.AddNested("FieldToMatch", err.(smithy.InvalidParamsError)) } } if len(v.TextTransformation) == 0 { invalidParams.Add(smithy.NewErrParamRequired("TextTransformation")) } if len(v.ComparisonOperator) == 0 { invalidParams.Add(smithy.NewErrParamRequired("ComparisonOperator")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateSizeConstraintSetUpdate(v *types.SizeConstraintSetUpdate) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "SizeConstraintSetUpdate"} if len(v.Action) == 0 { invalidParams.Add(smithy.NewErrParamRequired("Action")) } if v.SizeConstraint == nil { invalidParams.Add(smithy.NewErrParamRequired("SizeConstraint")) } else if v.SizeConstraint != nil { if err := validateSizeConstraint(v.SizeConstraint); err != nil { invalidParams.AddNested("SizeConstraint", err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateSizeConstraintSetUpdates(v []types.SizeConstraintSetUpdate) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "SizeConstraintSetUpdates"} for i := range v { if err := validateSizeConstraintSetUpdate(&v[i]); err != nil { invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateSqlInjectionMatchSetUpdate(v *types.SqlInjectionMatchSetUpdate) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "SqlInjectionMatchSetUpdate"} if len(v.Action) == 0 { invalidParams.Add(smithy.NewErrParamRequired("Action")) } if v.SqlInjectionMatchTuple == nil { invalidParams.Add(smithy.NewErrParamRequired("SqlInjectionMatchTuple")) } else if v.SqlInjectionMatchTuple != nil { if err := validateSqlInjectionMatchTuple(v.SqlInjectionMatchTuple); err != nil { invalidParams.AddNested("SqlInjectionMatchTuple", err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateSqlInjectionMatchSetUpdates(v []types.SqlInjectionMatchSetUpdate) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "SqlInjectionMatchSetUpdates"} for i := range v { if err := validateSqlInjectionMatchSetUpdate(&v[i]); err != nil { invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateSqlInjectionMatchTuple(v *types.SqlInjectionMatchTuple) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "SqlInjectionMatchTuple"} if v.FieldToMatch == nil { invalidParams.Add(smithy.NewErrParamRequired("FieldToMatch")) } else if v.FieldToMatch != nil { if err := validateFieldToMatch(v.FieldToMatch); err != nil { invalidParams.AddNested("FieldToMatch", err.(smithy.InvalidParamsError)) } } if len(v.TextTransformation) == 0 { invalidParams.Add(smithy.NewErrParamRequired("TextTransformation")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateTag(v *types.Tag) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "Tag"} if v.Key == nil { invalidParams.Add(smithy.NewErrParamRequired("Key")) } if v.Value == nil { invalidParams.Add(smithy.NewErrParamRequired("Value")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateTagList(v []types.Tag) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "TagList"} for i := range v { if err := validateTag(&v[i]); err != nil { invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateTimeWindow(v *types.TimeWindow) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "TimeWindow"} if v.StartTime == nil { invalidParams.Add(smithy.NewErrParamRequired("StartTime")) } if v.EndTime == nil { invalidParams.Add(smithy.NewErrParamRequired("EndTime")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateWafAction(v *types.WafAction) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "WafAction"} if len(v.Type) == 0 { invalidParams.Add(smithy.NewErrParamRequired("Type")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateWafOverrideAction(v *types.WafOverrideAction) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "WafOverrideAction"} if len(v.Type) == 0 { invalidParams.Add(smithy.NewErrParamRequired("Type")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateWebACLUpdate(v *types.WebACLUpdate) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "WebACLUpdate"} if len(v.Action) == 0 { invalidParams.Add(smithy.NewErrParamRequired("Action")) } if v.ActivatedRule == nil { invalidParams.Add(smithy.NewErrParamRequired("ActivatedRule")) } else if v.ActivatedRule != nil { if err := validateActivatedRule(v.ActivatedRule); err != nil { invalidParams.AddNested("ActivatedRule", err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateWebACLUpdates(v []types.WebACLUpdate) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "WebACLUpdates"} for i := range v { if err := validateWebACLUpdate(&v[i]); err != nil { invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateXssMatchSetUpdate(v *types.XssMatchSetUpdate) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "XssMatchSetUpdate"} if len(v.Action) == 0 { invalidParams.Add(smithy.NewErrParamRequired("Action")) } if v.XssMatchTuple == nil { invalidParams.Add(smithy.NewErrParamRequired("XssMatchTuple")) } else if v.XssMatchTuple != nil { if err := validateXssMatchTuple(v.XssMatchTuple); err != nil { invalidParams.AddNested("XssMatchTuple", err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateXssMatchSetUpdates(v []types.XssMatchSetUpdate) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "XssMatchSetUpdates"} for i := range v { if err := validateXssMatchSetUpdate(&v[i]); err != nil { invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateXssMatchTuple(v *types.XssMatchTuple) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "XssMatchTuple"} if v.FieldToMatch == nil { invalidParams.Add(smithy.NewErrParamRequired("FieldToMatch")) } else if v.FieldToMatch != nil { if err := validateFieldToMatch(v.FieldToMatch); err != nil { invalidParams.AddNested("FieldToMatch", err.(smithy.InvalidParamsError)) } } if len(v.TextTransformation) == 0 { invalidParams.Add(smithy.NewErrParamRequired("TextTransformation")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpCreateByteMatchSetInput(v *CreateByteMatchSetInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "CreateByteMatchSetInput"} if v.Name == nil { invalidParams.Add(smithy.NewErrParamRequired("Name")) } if v.ChangeToken == nil { invalidParams.Add(smithy.NewErrParamRequired("ChangeToken")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpCreateGeoMatchSetInput(v *CreateGeoMatchSetInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "CreateGeoMatchSetInput"} if v.Name == nil { invalidParams.Add(smithy.NewErrParamRequired("Name")) } if v.ChangeToken == nil { invalidParams.Add(smithy.NewErrParamRequired("ChangeToken")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpCreateIPSetInput(v *CreateIPSetInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "CreateIPSetInput"} if v.Name == nil { invalidParams.Add(smithy.NewErrParamRequired("Name")) } if v.ChangeToken == nil { invalidParams.Add(smithy.NewErrParamRequired("ChangeToken")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpCreateRateBasedRuleInput(v *CreateRateBasedRuleInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "CreateRateBasedRuleInput"} if v.Name == nil { invalidParams.Add(smithy.NewErrParamRequired("Name")) } if v.MetricName == nil { invalidParams.Add(smithy.NewErrParamRequired("MetricName")) } if len(v.RateKey) == 0 { invalidParams.Add(smithy.NewErrParamRequired("RateKey")) } if v.ChangeToken == nil { invalidParams.Add(smithy.NewErrParamRequired("ChangeToken")) } if v.Tags != nil { if err := validateTagList(v.Tags); err != nil { invalidParams.AddNested("Tags", err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpCreateRegexMatchSetInput(v *CreateRegexMatchSetInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "CreateRegexMatchSetInput"} if v.Name == nil { invalidParams.Add(smithy.NewErrParamRequired("Name")) } if v.ChangeToken == nil { invalidParams.Add(smithy.NewErrParamRequired("ChangeToken")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpCreateRegexPatternSetInput(v *CreateRegexPatternSetInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "CreateRegexPatternSetInput"} if v.Name == nil { invalidParams.Add(smithy.NewErrParamRequired("Name")) } if v.ChangeToken == nil { invalidParams.Add(smithy.NewErrParamRequired("ChangeToken")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpCreateRuleGroupInput(v *CreateRuleGroupInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "CreateRuleGroupInput"} if v.Name == nil { invalidParams.Add(smithy.NewErrParamRequired("Name")) } if v.MetricName == nil { invalidParams.Add(smithy.NewErrParamRequired("MetricName")) } if v.ChangeToken == nil { invalidParams.Add(smithy.NewErrParamRequired("ChangeToken")) } if v.Tags != nil { if err := validateTagList(v.Tags); err != nil { invalidParams.AddNested("Tags", err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpCreateRuleInput(v *CreateRuleInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "CreateRuleInput"} if v.Name == nil { invalidParams.Add(smithy.NewErrParamRequired("Name")) } if v.MetricName == nil { invalidParams.Add(smithy.NewErrParamRequired("MetricName")) } if v.ChangeToken == nil { invalidParams.Add(smithy.NewErrParamRequired("ChangeToken")) } if v.Tags != nil { if err := validateTagList(v.Tags); err != nil { invalidParams.AddNested("Tags", err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpCreateSizeConstraintSetInput(v *CreateSizeConstraintSetInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "CreateSizeConstraintSetInput"} if v.Name == nil { invalidParams.Add(smithy.NewErrParamRequired("Name")) } if v.ChangeToken == nil { invalidParams.Add(smithy.NewErrParamRequired("ChangeToken")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpCreateSqlInjectionMatchSetInput(v *CreateSqlInjectionMatchSetInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "CreateSqlInjectionMatchSetInput"} if v.Name == nil { invalidParams.Add(smithy.NewErrParamRequired("Name")) } if v.ChangeToken == nil { invalidParams.Add(smithy.NewErrParamRequired("ChangeToken")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpCreateWebACLInput(v *CreateWebACLInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "CreateWebACLInput"} if v.Name == nil { invalidParams.Add(smithy.NewErrParamRequired("Name")) } if v.MetricName == nil { invalidParams.Add(smithy.NewErrParamRequired("MetricName")) } if v.DefaultAction == nil { invalidParams.Add(smithy.NewErrParamRequired("DefaultAction")) } else if v.DefaultAction != nil { if err := validateWafAction(v.DefaultAction); err != nil { invalidParams.AddNested("DefaultAction", err.(smithy.InvalidParamsError)) } } if v.ChangeToken == nil { invalidParams.Add(smithy.NewErrParamRequired("ChangeToken")) } if v.Tags != nil { if err := validateTagList(v.Tags); err != nil { invalidParams.AddNested("Tags", err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpCreateWebACLMigrationStackInput(v *CreateWebACLMigrationStackInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "CreateWebACLMigrationStackInput"} if v.WebACLId == nil { invalidParams.Add(smithy.NewErrParamRequired("WebACLId")) } if v.S3BucketName == nil { invalidParams.Add(smithy.NewErrParamRequired("S3BucketName")) } if v.IgnoreUnsupportedType == nil { invalidParams.Add(smithy.NewErrParamRequired("IgnoreUnsupportedType")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpCreateXssMatchSetInput(v *CreateXssMatchSetInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "CreateXssMatchSetInput"} if v.Name == nil { invalidParams.Add(smithy.NewErrParamRequired("Name")) } if v.ChangeToken == nil { invalidParams.Add(smithy.NewErrParamRequired("ChangeToken")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpDeleteByteMatchSetInput(v *DeleteByteMatchSetInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "DeleteByteMatchSetInput"} if v.ByteMatchSetId == nil { invalidParams.Add(smithy.NewErrParamRequired("ByteMatchSetId")) } if v.ChangeToken == nil { invalidParams.Add(smithy.NewErrParamRequired("ChangeToken")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpDeleteGeoMatchSetInput(v *DeleteGeoMatchSetInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "DeleteGeoMatchSetInput"} if v.GeoMatchSetId == nil { invalidParams.Add(smithy.NewErrParamRequired("GeoMatchSetId")) } if v.ChangeToken == nil { invalidParams.Add(smithy.NewErrParamRequired("ChangeToken")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpDeleteIPSetInput(v *DeleteIPSetInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "DeleteIPSetInput"} if v.IPSetId == nil { invalidParams.Add(smithy.NewErrParamRequired("IPSetId")) } if v.ChangeToken == nil { invalidParams.Add(smithy.NewErrParamRequired("ChangeToken")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpDeleteLoggingConfigurationInput(v *DeleteLoggingConfigurationInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "DeleteLoggingConfigurationInput"} if v.ResourceArn == nil { invalidParams.Add(smithy.NewErrParamRequired("ResourceArn")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpDeletePermissionPolicyInput(v *DeletePermissionPolicyInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "DeletePermissionPolicyInput"} if v.ResourceArn == nil { invalidParams.Add(smithy.NewErrParamRequired("ResourceArn")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpDeleteRateBasedRuleInput(v *DeleteRateBasedRuleInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "DeleteRateBasedRuleInput"} if v.RuleId == nil { invalidParams.Add(smithy.NewErrParamRequired("RuleId")) } if v.ChangeToken == nil { invalidParams.Add(smithy.NewErrParamRequired("ChangeToken")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpDeleteRegexMatchSetInput(v *DeleteRegexMatchSetInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "DeleteRegexMatchSetInput"} if v.RegexMatchSetId == nil { invalidParams.Add(smithy.NewErrParamRequired("RegexMatchSetId")) } if v.ChangeToken == nil { invalidParams.Add(smithy.NewErrParamRequired("ChangeToken")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpDeleteRegexPatternSetInput(v *DeleteRegexPatternSetInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "DeleteRegexPatternSetInput"} if v.RegexPatternSetId == nil { invalidParams.Add(smithy.NewErrParamRequired("RegexPatternSetId")) } if v.ChangeToken == nil { invalidParams.Add(smithy.NewErrParamRequired("ChangeToken")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpDeleteRuleGroupInput(v *DeleteRuleGroupInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "DeleteRuleGroupInput"} if v.RuleGroupId == nil { invalidParams.Add(smithy.NewErrParamRequired("RuleGroupId")) } if v.ChangeToken == nil { invalidParams.Add(smithy.NewErrParamRequired("ChangeToken")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpDeleteRuleInput(v *DeleteRuleInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "DeleteRuleInput"} if v.RuleId == nil { invalidParams.Add(smithy.NewErrParamRequired("RuleId")) } if v.ChangeToken == nil { invalidParams.Add(smithy.NewErrParamRequired("ChangeToken")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpDeleteSizeConstraintSetInput(v *DeleteSizeConstraintSetInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "DeleteSizeConstraintSetInput"} if v.SizeConstraintSetId == nil { invalidParams.Add(smithy.NewErrParamRequired("SizeConstraintSetId")) } if v.ChangeToken == nil { invalidParams.Add(smithy.NewErrParamRequired("ChangeToken")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpDeleteSqlInjectionMatchSetInput(v *DeleteSqlInjectionMatchSetInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "DeleteSqlInjectionMatchSetInput"} if v.SqlInjectionMatchSetId == nil { invalidParams.Add(smithy.NewErrParamRequired("SqlInjectionMatchSetId")) } if v.ChangeToken == nil { invalidParams.Add(smithy.NewErrParamRequired("ChangeToken")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpDeleteWebACLInput(v *DeleteWebACLInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "DeleteWebACLInput"} if v.WebACLId == nil { invalidParams.Add(smithy.NewErrParamRequired("WebACLId")) } if v.ChangeToken == nil { invalidParams.Add(smithy.NewErrParamRequired("ChangeToken")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpDeleteXssMatchSetInput(v *DeleteXssMatchSetInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "DeleteXssMatchSetInput"} if v.XssMatchSetId == nil { invalidParams.Add(smithy.NewErrParamRequired("XssMatchSetId")) } if v.ChangeToken == nil { invalidParams.Add(smithy.NewErrParamRequired("ChangeToken")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpGetByteMatchSetInput(v *GetByteMatchSetInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "GetByteMatchSetInput"} if v.ByteMatchSetId == nil { invalidParams.Add(smithy.NewErrParamRequired("ByteMatchSetId")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpGetChangeTokenStatusInput(v *GetChangeTokenStatusInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "GetChangeTokenStatusInput"} if v.ChangeToken == nil { invalidParams.Add(smithy.NewErrParamRequired("ChangeToken")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpGetGeoMatchSetInput(v *GetGeoMatchSetInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "GetGeoMatchSetInput"} if v.GeoMatchSetId == nil { invalidParams.Add(smithy.NewErrParamRequired("GeoMatchSetId")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpGetIPSetInput(v *GetIPSetInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "GetIPSetInput"} if v.IPSetId == nil { invalidParams.Add(smithy.NewErrParamRequired("IPSetId")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpGetLoggingConfigurationInput(v *GetLoggingConfigurationInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "GetLoggingConfigurationInput"} if v.ResourceArn == nil { invalidParams.Add(smithy.NewErrParamRequired("ResourceArn")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpGetPermissionPolicyInput(v *GetPermissionPolicyInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "GetPermissionPolicyInput"} if v.ResourceArn == nil { invalidParams.Add(smithy.NewErrParamRequired("ResourceArn")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpGetRateBasedRuleInput(v *GetRateBasedRuleInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "GetRateBasedRuleInput"} if v.RuleId == nil { invalidParams.Add(smithy.NewErrParamRequired("RuleId")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpGetRateBasedRuleManagedKeysInput(v *GetRateBasedRuleManagedKeysInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "GetRateBasedRuleManagedKeysInput"} if v.RuleId == nil { invalidParams.Add(smithy.NewErrParamRequired("RuleId")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpGetRegexMatchSetInput(v *GetRegexMatchSetInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "GetRegexMatchSetInput"} if v.RegexMatchSetId == nil { invalidParams.Add(smithy.NewErrParamRequired("RegexMatchSetId")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpGetRegexPatternSetInput(v *GetRegexPatternSetInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "GetRegexPatternSetInput"} if v.RegexPatternSetId == nil { invalidParams.Add(smithy.NewErrParamRequired("RegexPatternSetId")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpGetRuleGroupInput(v *GetRuleGroupInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "GetRuleGroupInput"} if v.RuleGroupId == nil { invalidParams.Add(smithy.NewErrParamRequired("RuleGroupId")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpGetRuleInput(v *GetRuleInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "GetRuleInput"} if v.RuleId == nil { invalidParams.Add(smithy.NewErrParamRequired("RuleId")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpGetSampledRequestsInput(v *GetSampledRequestsInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "GetSampledRequestsInput"} if v.WebAclId == nil { invalidParams.Add(smithy.NewErrParamRequired("WebAclId")) } if v.RuleId == nil { invalidParams.Add(smithy.NewErrParamRequired("RuleId")) } if v.TimeWindow == nil { invalidParams.Add(smithy.NewErrParamRequired("TimeWindow")) } else if v.TimeWindow != nil { if err := validateTimeWindow(v.TimeWindow); err != nil { invalidParams.AddNested("TimeWindow", err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpGetSizeConstraintSetInput(v *GetSizeConstraintSetInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "GetSizeConstraintSetInput"} if v.SizeConstraintSetId == nil { invalidParams.Add(smithy.NewErrParamRequired("SizeConstraintSetId")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpGetSqlInjectionMatchSetInput(v *GetSqlInjectionMatchSetInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "GetSqlInjectionMatchSetInput"} if v.SqlInjectionMatchSetId == nil { invalidParams.Add(smithy.NewErrParamRequired("SqlInjectionMatchSetId")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpGetWebACLInput(v *GetWebACLInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "GetWebACLInput"} if v.WebACLId == nil { invalidParams.Add(smithy.NewErrParamRequired("WebACLId")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpGetXssMatchSetInput(v *GetXssMatchSetInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "GetXssMatchSetInput"} if v.XssMatchSetId == nil { invalidParams.Add(smithy.NewErrParamRequired("XssMatchSetId")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpListTagsForResourceInput(v *ListTagsForResourceInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "ListTagsForResourceInput"} if v.ResourceARN == nil { invalidParams.Add(smithy.NewErrParamRequired("ResourceARN")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpPutLoggingConfigurationInput(v *PutLoggingConfigurationInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "PutLoggingConfigurationInput"} if v.LoggingConfiguration == nil { invalidParams.Add(smithy.NewErrParamRequired("LoggingConfiguration")) } else if v.LoggingConfiguration != nil { if err := validateLoggingConfiguration(v.LoggingConfiguration); err != nil { invalidParams.AddNested("LoggingConfiguration", err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpPutPermissionPolicyInput(v *PutPermissionPolicyInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "PutPermissionPolicyInput"} if v.ResourceArn == nil { invalidParams.Add(smithy.NewErrParamRequired("ResourceArn")) } if v.Policy == nil { invalidParams.Add(smithy.NewErrParamRequired("Policy")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpTagResourceInput(v *TagResourceInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "TagResourceInput"} if v.ResourceARN == nil { invalidParams.Add(smithy.NewErrParamRequired("ResourceARN")) } if v.Tags == nil { invalidParams.Add(smithy.NewErrParamRequired("Tags")) } else if v.Tags != nil { if err := validateTagList(v.Tags); err != nil { invalidParams.AddNested("Tags", err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpUntagResourceInput(v *UntagResourceInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "UntagResourceInput"} if v.ResourceARN == nil { invalidParams.Add(smithy.NewErrParamRequired("ResourceARN")) } if v.TagKeys == nil { invalidParams.Add(smithy.NewErrParamRequired("TagKeys")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpUpdateByteMatchSetInput(v *UpdateByteMatchSetInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "UpdateByteMatchSetInput"} if v.ByteMatchSetId == nil { invalidParams.Add(smithy.NewErrParamRequired("ByteMatchSetId")) } if v.ChangeToken == nil { invalidParams.Add(smithy.NewErrParamRequired("ChangeToken")) } if v.Updates == nil { invalidParams.Add(smithy.NewErrParamRequired("Updates")) } else if v.Updates != nil { if err := validateByteMatchSetUpdates(v.Updates); err != nil { invalidParams.AddNested("Updates", err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpUpdateGeoMatchSetInput(v *UpdateGeoMatchSetInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "UpdateGeoMatchSetInput"} if v.GeoMatchSetId == nil { invalidParams.Add(smithy.NewErrParamRequired("GeoMatchSetId")) } if v.ChangeToken == nil { invalidParams.Add(smithy.NewErrParamRequired("ChangeToken")) } if v.Updates == nil { invalidParams.Add(smithy.NewErrParamRequired("Updates")) } else if v.Updates != nil { if err := validateGeoMatchSetUpdates(v.Updates); err != nil { invalidParams.AddNested("Updates", err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpUpdateIPSetInput(v *UpdateIPSetInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "UpdateIPSetInput"} if v.IPSetId == nil { invalidParams.Add(smithy.NewErrParamRequired("IPSetId")) } if v.ChangeToken == nil { invalidParams.Add(smithy.NewErrParamRequired("ChangeToken")) } if v.Updates == nil { invalidParams.Add(smithy.NewErrParamRequired("Updates")) } else if v.Updates != nil { if err := validateIPSetUpdates(v.Updates); err != nil { invalidParams.AddNested("Updates", err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpUpdateRateBasedRuleInput(v *UpdateRateBasedRuleInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "UpdateRateBasedRuleInput"} if v.RuleId == nil { invalidParams.Add(smithy.NewErrParamRequired("RuleId")) } if v.ChangeToken == nil { invalidParams.Add(smithy.NewErrParamRequired("ChangeToken")) } if v.Updates == nil { invalidParams.Add(smithy.NewErrParamRequired("Updates")) } else if v.Updates != nil { if err := validateRuleUpdates(v.Updates); err != nil { invalidParams.AddNested("Updates", err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpUpdateRegexMatchSetInput(v *UpdateRegexMatchSetInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "UpdateRegexMatchSetInput"} if v.RegexMatchSetId == nil { invalidParams.Add(smithy.NewErrParamRequired("RegexMatchSetId")) } if v.Updates == nil { invalidParams.Add(smithy.NewErrParamRequired("Updates")) } else if v.Updates != nil { if err := validateRegexMatchSetUpdates(v.Updates); err != nil { invalidParams.AddNested("Updates", err.(smithy.InvalidParamsError)) } } if v.ChangeToken == nil { invalidParams.Add(smithy.NewErrParamRequired("ChangeToken")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpUpdateRegexPatternSetInput(v *UpdateRegexPatternSetInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "UpdateRegexPatternSetInput"} if v.RegexPatternSetId == nil { invalidParams.Add(smithy.NewErrParamRequired("RegexPatternSetId")) } if v.Updates == nil { invalidParams.Add(smithy.NewErrParamRequired("Updates")) } else if v.Updates != nil { if err := validateRegexPatternSetUpdates(v.Updates); err != nil { invalidParams.AddNested("Updates", err.(smithy.InvalidParamsError)) } } if v.ChangeToken == nil { invalidParams.Add(smithy.NewErrParamRequired("ChangeToken")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpUpdateRuleGroupInput(v *UpdateRuleGroupInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "UpdateRuleGroupInput"} if v.RuleGroupId == nil { invalidParams.Add(smithy.NewErrParamRequired("RuleGroupId")) } if v.Updates == nil { invalidParams.Add(smithy.NewErrParamRequired("Updates")) } else if v.Updates != nil { if err := validateRuleGroupUpdates(v.Updates); err != nil { invalidParams.AddNested("Updates", err.(smithy.InvalidParamsError)) } } if v.ChangeToken == nil { invalidParams.Add(smithy.NewErrParamRequired("ChangeToken")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpUpdateRuleInput(v *UpdateRuleInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "UpdateRuleInput"} if v.RuleId == nil { invalidParams.Add(smithy.NewErrParamRequired("RuleId")) } if v.ChangeToken == nil { invalidParams.Add(smithy.NewErrParamRequired("ChangeToken")) } if v.Updates == nil { invalidParams.Add(smithy.NewErrParamRequired("Updates")) } else if v.Updates != nil { if err := validateRuleUpdates(v.Updates); err != nil { invalidParams.AddNested("Updates", err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpUpdateSizeConstraintSetInput(v *UpdateSizeConstraintSetInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "UpdateSizeConstraintSetInput"} if v.SizeConstraintSetId == nil { invalidParams.Add(smithy.NewErrParamRequired("SizeConstraintSetId")) } if v.ChangeToken == nil { invalidParams.Add(smithy.NewErrParamRequired("ChangeToken")) } if v.Updates == nil { invalidParams.Add(smithy.NewErrParamRequired("Updates")) } else if v.Updates != nil { if err := validateSizeConstraintSetUpdates(v.Updates); err != nil { invalidParams.AddNested("Updates", err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpUpdateSqlInjectionMatchSetInput(v *UpdateSqlInjectionMatchSetInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "UpdateSqlInjectionMatchSetInput"} if v.SqlInjectionMatchSetId == nil { invalidParams.Add(smithy.NewErrParamRequired("SqlInjectionMatchSetId")) } if v.ChangeToken == nil { invalidParams.Add(smithy.NewErrParamRequired("ChangeToken")) } if v.Updates == nil { invalidParams.Add(smithy.NewErrParamRequired("Updates")) } else if v.Updates != nil { if err := validateSqlInjectionMatchSetUpdates(v.Updates); err != nil { invalidParams.AddNested("Updates", err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpUpdateWebACLInput(v *UpdateWebACLInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "UpdateWebACLInput"} if v.WebACLId == nil { invalidParams.Add(smithy.NewErrParamRequired("WebACLId")) } if v.ChangeToken == nil { invalidParams.Add(smithy.NewErrParamRequired("ChangeToken")) } if v.Updates != nil { if err := validateWebACLUpdates(v.Updates); err != nil { invalidParams.AddNested("Updates", err.(smithy.InvalidParamsError)) } } if v.DefaultAction != nil { if err := validateWafAction(v.DefaultAction); err != nil { invalidParams.AddNested("DefaultAction", err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpUpdateXssMatchSetInput(v *UpdateXssMatchSetInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "UpdateXssMatchSetInput"} if v.XssMatchSetId == nil { invalidParams.Add(smithy.NewErrParamRequired("XssMatchSetId")) } if v.ChangeToken == nil { invalidParams.Add(smithy.NewErrParamRequired("ChangeToken")) } if v.Updates == nil { invalidParams.Add(smithy.NewErrParamRequired("Updates")) } else if v.Updates != nil { if err := validateXssMatchSetUpdates(v.Updates); err != nil { invalidParams.AddNested("Updates", err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } }
3,468
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package endpoints import ( "github.com/aws/aws-sdk-go-v2/aws" endpoints "github.com/aws/aws-sdk-go-v2/internal/endpoints/v2" "github.com/aws/smithy-go/logging" "regexp" ) // Options is the endpoint resolver configuration options type Options struct { // Logger is a logging implementation that log events should be sent to. Logger logging.Logger // LogDeprecated indicates that deprecated endpoints should be logged to the // provided logger. LogDeprecated bool // ResolvedRegion is used to override the region to be resolved, rather then the // using the value passed to the ResolveEndpoint method. This value is used by the // SDK to translate regions like fips-us-east-1 or us-east-1-fips to an alternative // name. You must not set this value directly in your application. ResolvedRegion string // DisableHTTPS informs the resolver to return an endpoint that does not use the // HTTPS scheme. DisableHTTPS bool // UseDualStackEndpoint specifies the resolver must resolve a dual-stack endpoint. UseDualStackEndpoint aws.DualStackEndpointState // UseFIPSEndpoint specifies the resolver must resolve a FIPS endpoint. UseFIPSEndpoint aws.FIPSEndpointState } func (o Options) GetResolvedRegion() string { return o.ResolvedRegion } func (o Options) GetDisableHTTPS() bool { return o.DisableHTTPS } func (o Options) GetUseDualStackEndpoint() aws.DualStackEndpointState { return o.UseDualStackEndpoint } func (o Options) GetUseFIPSEndpoint() aws.FIPSEndpointState { return o.UseFIPSEndpoint } func transformToSharedOptions(options Options) endpoints.Options { return endpoints.Options{ Logger: options.Logger, LogDeprecated: options.LogDeprecated, ResolvedRegion: options.ResolvedRegion, DisableHTTPS: options.DisableHTTPS, UseDualStackEndpoint: options.UseDualStackEndpoint, UseFIPSEndpoint: options.UseFIPSEndpoint, } } // Resolver WAF endpoint resolver type Resolver struct { partitions endpoints.Partitions } // ResolveEndpoint resolves the service endpoint for the given region and options func (r *Resolver) ResolveEndpoint(region string, options Options) (endpoint aws.Endpoint, err error) { if len(region) == 0 { return endpoint, &aws.MissingRegionError{} } opt := transformToSharedOptions(options) return r.partitions.ResolveEndpoint(region, opt) } // New returns a new Resolver func New() *Resolver { return &Resolver{ partitions: defaultPartitions, } } var partitionRegexp = struct { Aws *regexp.Regexp AwsCn *regexp.Regexp AwsIso *regexp.Regexp AwsIsoB *regexp.Regexp AwsIsoE *regexp.Regexp AwsIsoF *regexp.Regexp AwsUsGov *regexp.Regexp }{ Aws: regexp.MustCompile("^(us|eu|ap|sa|ca|me|af)\\-\\w+\\-\\d+$"), AwsCn: regexp.MustCompile("^cn\\-\\w+\\-\\d+$"), AwsIso: regexp.MustCompile("^us\\-iso\\-\\w+\\-\\d+$"), AwsIsoB: regexp.MustCompile("^us\\-isob\\-\\w+\\-\\d+$"), AwsIsoE: regexp.MustCompile("^eu\\-isoe\\-\\w+\\-\\d+$"), AwsIsoF: regexp.MustCompile("^us\\-isof\\-\\w+\\-\\d+$"), AwsUsGov: regexp.MustCompile("^us\\-gov\\-\\w+\\-\\d+$"), } var defaultPartitions = endpoints.Partitions{ { ID: "aws", Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{ { Variant: endpoints.DualStackVariant, }: { Hostname: "waf.{region}.api.aws", Protocols: []string{"https"}, SignatureVersions: []string{"v4"}, }, { Variant: endpoints.FIPSVariant, }: { Hostname: "waf-fips.{region}.amazonaws.com", Protocols: []string{"https"}, SignatureVersions: []string{"v4"}, }, { Variant: endpoints.FIPSVariant | endpoints.DualStackVariant, }: { Hostname: "waf-fips.{region}.api.aws", Protocols: []string{"https"}, SignatureVersions: []string{"v4"}, }, { Variant: 0, }: { Hostname: "waf.{region}.amazonaws.com", Protocols: []string{"https"}, SignatureVersions: []string{"v4"}, }, }, RegionRegex: partitionRegexp.Aws, IsRegionalized: false, PartitionEndpoint: "aws-global", Endpoints: endpoints.Endpoints{ endpoints.EndpointKey{ Region: "aws", }: endpoints.Endpoint{ CredentialScope: endpoints.CredentialScope{ Region: "us-east-1", }, Deprecated: aws.TrueTernary, }, endpoints.EndpointKey{ Region: "aws", Variant: endpoints.FIPSVariant, }: { Hostname: "waf-fips.amazonaws.com", CredentialScope: endpoints.CredentialScope{ Region: "us-east-1", }, Deprecated: aws.TrueTernary, }, endpoints.EndpointKey{ Region: "aws-fips", }: endpoints.Endpoint{ Hostname: "waf-fips.amazonaws.com", CredentialScope: endpoints.CredentialScope{ Region: "us-east-1", }, Deprecated: aws.TrueTernary, }, endpoints.EndpointKey{ Region: "aws-global", }: endpoints.Endpoint{ Hostname: "waf.amazonaws.com", CredentialScope: endpoints.CredentialScope{ Region: "us-east-1", }, }, endpoints.EndpointKey{ Region: "aws-global", Variant: endpoints.FIPSVariant, }: { Hostname: "waf-fips.amazonaws.com", CredentialScope: endpoints.CredentialScope{ Region: "us-east-1", }, }, endpoints.EndpointKey{ Region: "aws-global-fips", }: endpoints.Endpoint{ Hostname: "waf-fips.amazonaws.com", CredentialScope: endpoints.CredentialScope{ Region: "us-east-1", }, Deprecated: aws.TrueTernary, }, }, }, { ID: "aws-cn", Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{ { Variant: endpoints.DualStackVariant, }: { Hostname: "waf.{region}.api.amazonwebservices.com.cn", Protocols: []string{"https"}, SignatureVersions: []string{"v4"}, }, { Variant: endpoints.FIPSVariant, }: { Hostname: "waf-fips.{region}.amazonaws.com.cn", Protocols: []string{"https"}, SignatureVersions: []string{"v4"}, }, { Variant: endpoints.FIPSVariant | endpoints.DualStackVariant, }: { Hostname: "waf-fips.{region}.api.amazonwebservices.com.cn", Protocols: []string{"https"}, SignatureVersions: []string{"v4"}, }, { Variant: 0, }: { Hostname: "waf.{region}.amazonaws.com.cn", Protocols: []string{"https"}, SignatureVersions: []string{"v4"}, }, }, RegionRegex: partitionRegexp.AwsCn, IsRegionalized: true, }, { ID: "aws-iso", Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{ { Variant: endpoints.FIPSVariant, }: { Hostname: "waf-fips.{region}.c2s.ic.gov", Protocols: []string{"https"}, SignatureVersions: []string{"v4"}, }, { Variant: 0, }: { Hostname: "waf.{region}.c2s.ic.gov", Protocols: []string{"https"}, SignatureVersions: []string{"v4"}, }, }, RegionRegex: partitionRegexp.AwsIso, IsRegionalized: true, }, { ID: "aws-iso-b", Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{ { Variant: endpoints.FIPSVariant, }: { Hostname: "waf-fips.{region}.sc2s.sgov.gov", Protocols: []string{"https"}, SignatureVersions: []string{"v4"}, }, { Variant: 0, }: { Hostname: "waf.{region}.sc2s.sgov.gov", Protocols: []string{"https"}, SignatureVersions: []string{"v4"}, }, }, RegionRegex: partitionRegexp.AwsIsoB, IsRegionalized: true, }, { ID: "aws-iso-e", Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{ { Variant: endpoints.FIPSVariant, }: { Hostname: "waf-fips.{region}.cloud.adc-e.uk", Protocols: []string{"https"}, SignatureVersions: []string{"v4"}, }, { Variant: 0, }: { Hostname: "waf.{region}.cloud.adc-e.uk", Protocols: []string{"https"}, SignatureVersions: []string{"v4"}, }, }, RegionRegex: partitionRegexp.AwsIsoE, IsRegionalized: true, }, { ID: "aws-iso-f", Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{ { Variant: endpoints.FIPSVariant, }: { Hostname: "waf-fips.{region}.csp.hci.ic.gov", Protocols: []string{"https"}, SignatureVersions: []string{"v4"}, }, { Variant: 0, }: { Hostname: "waf.{region}.csp.hci.ic.gov", Protocols: []string{"https"}, SignatureVersions: []string{"v4"}, }, }, RegionRegex: partitionRegexp.AwsIsoF, IsRegionalized: true, }, { ID: "aws-us-gov", Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{ { Variant: endpoints.DualStackVariant, }: { Hostname: "waf.{region}.api.aws", Protocols: []string{"https"}, SignatureVersions: []string{"v4"}, }, { Variant: endpoints.FIPSVariant, }: { Hostname: "waf-fips.{region}.amazonaws.com", Protocols: []string{"https"}, SignatureVersions: []string{"v4"}, }, { Variant: endpoints.FIPSVariant | endpoints.DualStackVariant, }: { Hostname: "waf-fips.{region}.api.aws", Protocols: []string{"https"}, SignatureVersions: []string{"v4"}, }, { Variant: 0, }: { Hostname: "waf.{region}.amazonaws.com", Protocols: []string{"https"}, SignatureVersions: []string{"v4"}, }, }, RegionRegex: partitionRegexp.AwsUsGov, IsRegionalized: true, }, }
353
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package endpoints import ( "testing" ) func TestRegexCompile(t *testing.T) { _ = defaultPartitions }
12
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package types type ChangeAction string // Enum values for ChangeAction const ( ChangeActionInsert ChangeAction = "INSERT" ChangeActionDelete ChangeAction = "DELETE" ) // Values returns all known values for ChangeAction. Note that this can be // expanded in the future, and so it is only as up to date as the client. The // ordering of this slice is not guaranteed to be stable across updates. func (ChangeAction) Values() []ChangeAction { return []ChangeAction{ "INSERT", "DELETE", } } type ChangeTokenStatus string // Enum values for ChangeTokenStatus const ( ChangeTokenStatusProvisioned ChangeTokenStatus = "PROVISIONED" ChangeTokenStatusPending ChangeTokenStatus = "PENDING" ChangeTokenStatusInsync ChangeTokenStatus = "INSYNC" ) // Values returns all known values for ChangeTokenStatus. Note that this can be // expanded in the future, and so it is only as up to date as the client. The // ordering of this slice is not guaranteed to be stable across updates. func (ChangeTokenStatus) Values() []ChangeTokenStatus { return []ChangeTokenStatus{ "PROVISIONED", "PENDING", "INSYNC", } } type ComparisonOperator string // Enum values for ComparisonOperator const ( ComparisonOperatorEq ComparisonOperator = "EQ" ComparisonOperatorNe ComparisonOperator = "NE" ComparisonOperatorLe ComparisonOperator = "LE" ComparisonOperatorLt ComparisonOperator = "LT" ComparisonOperatorGe ComparisonOperator = "GE" ComparisonOperatorGt ComparisonOperator = "GT" ) // Values returns all known values for ComparisonOperator. Note that this can be // expanded in the future, and so it is only as up to date as the client. The // ordering of this slice is not guaranteed to be stable across updates. func (ComparisonOperator) Values() []ComparisonOperator { return []ComparisonOperator{ "EQ", "NE", "LE", "LT", "GE", "GT", } } type GeoMatchConstraintType string // Enum values for GeoMatchConstraintType const ( GeoMatchConstraintTypeCountry GeoMatchConstraintType = "Country" ) // Values returns all known values for GeoMatchConstraintType. Note that this can // be expanded in the future, and so it is only as up to date as the client. The // ordering of this slice is not guaranteed to be stable across updates. func (GeoMatchConstraintType) Values() []GeoMatchConstraintType { return []GeoMatchConstraintType{ "Country", } } type GeoMatchConstraintValue string // Enum values for GeoMatchConstraintValue const ( GeoMatchConstraintValueAf GeoMatchConstraintValue = "AF" GeoMatchConstraintValueAx GeoMatchConstraintValue = "AX" GeoMatchConstraintValueAl GeoMatchConstraintValue = "AL" GeoMatchConstraintValueDz GeoMatchConstraintValue = "DZ" GeoMatchConstraintValueAs GeoMatchConstraintValue = "AS" GeoMatchConstraintValueAd GeoMatchConstraintValue = "AD" GeoMatchConstraintValueAo GeoMatchConstraintValue = "AO" GeoMatchConstraintValueAi GeoMatchConstraintValue = "AI" GeoMatchConstraintValueAq GeoMatchConstraintValue = "AQ" GeoMatchConstraintValueAg GeoMatchConstraintValue = "AG" GeoMatchConstraintValueAr GeoMatchConstraintValue = "AR" GeoMatchConstraintValueAm GeoMatchConstraintValue = "AM" GeoMatchConstraintValueAw GeoMatchConstraintValue = "AW" GeoMatchConstraintValueAu GeoMatchConstraintValue = "AU" GeoMatchConstraintValueAt GeoMatchConstraintValue = "AT" GeoMatchConstraintValueAz GeoMatchConstraintValue = "AZ" GeoMatchConstraintValueBs GeoMatchConstraintValue = "BS" GeoMatchConstraintValueBh GeoMatchConstraintValue = "BH" GeoMatchConstraintValueBd GeoMatchConstraintValue = "BD" GeoMatchConstraintValueBb GeoMatchConstraintValue = "BB" GeoMatchConstraintValueBy GeoMatchConstraintValue = "BY" GeoMatchConstraintValueBe GeoMatchConstraintValue = "BE" GeoMatchConstraintValueBz GeoMatchConstraintValue = "BZ" GeoMatchConstraintValueBj GeoMatchConstraintValue = "BJ" GeoMatchConstraintValueBm GeoMatchConstraintValue = "BM" GeoMatchConstraintValueBt GeoMatchConstraintValue = "BT" GeoMatchConstraintValueBo GeoMatchConstraintValue = "BO" GeoMatchConstraintValueBq GeoMatchConstraintValue = "BQ" GeoMatchConstraintValueBa GeoMatchConstraintValue = "BA" GeoMatchConstraintValueBw GeoMatchConstraintValue = "BW" GeoMatchConstraintValueBv GeoMatchConstraintValue = "BV" GeoMatchConstraintValueBr GeoMatchConstraintValue = "BR" GeoMatchConstraintValueIo GeoMatchConstraintValue = "IO" GeoMatchConstraintValueBn GeoMatchConstraintValue = "BN" GeoMatchConstraintValueBg GeoMatchConstraintValue = "BG" GeoMatchConstraintValueBf GeoMatchConstraintValue = "BF" GeoMatchConstraintValueBi GeoMatchConstraintValue = "BI" GeoMatchConstraintValueKh GeoMatchConstraintValue = "KH" GeoMatchConstraintValueCm GeoMatchConstraintValue = "CM" GeoMatchConstraintValueCa GeoMatchConstraintValue = "CA" GeoMatchConstraintValueCv GeoMatchConstraintValue = "CV" GeoMatchConstraintValueKy GeoMatchConstraintValue = "KY" GeoMatchConstraintValueCf GeoMatchConstraintValue = "CF" GeoMatchConstraintValueTd GeoMatchConstraintValue = "TD" GeoMatchConstraintValueCl GeoMatchConstraintValue = "CL" GeoMatchConstraintValueCn GeoMatchConstraintValue = "CN" GeoMatchConstraintValueCx GeoMatchConstraintValue = "CX" GeoMatchConstraintValueCc GeoMatchConstraintValue = "CC" GeoMatchConstraintValueCo GeoMatchConstraintValue = "CO" GeoMatchConstraintValueKm GeoMatchConstraintValue = "KM" GeoMatchConstraintValueCg GeoMatchConstraintValue = "CG" GeoMatchConstraintValueCd GeoMatchConstraintValue = "CD" GeoMatchConstraintValueCk GeoMatchConstraintValue = "CK" GeoMatchConstraintValueCr GeoMatchConstraintValue = "CR" GeoMatchConstraintValueCi GeoMatchConstraintValue = "CI" GeoMatchConstraintValueHr GeoMatchConstraintValue = "HR" GeoMatchConstraintValueCu GeoMatchConstraintValue = "CU" GeoMatchConstraintValueCw GeoMatchConstraintValue = "CW" GeoMatchConstraintValueCy GeoMatchConstraintValue = "CY" GeoMatchConstraintValueCz GeoMatchConstraintValue = "CZ" GeoMatchConstraintValueDk GeoMatchConstraintValue = "DK" GeoMatchConstraintValueDj GeoMatchConstraintValue = "DJ" GeoMatchConstraintValueDm GeoMatchConstraintValue = "DM" GeoMatchConstraintValueDo GeoMatchConstraintValue = "DO" GeoMatchConstraintValueEc GeoMatchConstraintValue = "EC" GeoMatchConstraintValueEg GeoMatchConstraintValue = "EG" GeoMatchConstraintValueSv GeoMatchConstraintValue = "SV" GeoMatchConstraintValueGq GeoMatchConstraintValue = "GQ" GeoMatchConstraintValueEr GeoMatchConstraintValue = "ER" GeoMatchConstraintValueEe GeoMatchConstraintValue = "EE" GeoMatchConstraintValueEt GeoMatchConstraintValue = "ET" GeoMatchConstraintValueFk GeoMatchConstraintValue = "FK" GeoMatchConstraintValueFo GeoMatchConstraintValue = "FO" GeoMatchConstraintValueFj GeoMatchConstraintValue = "FJ" GeoMatchConstraintValueFi GeoMatchConstraintValue = "FI" GeoMatchConstraintValueFr GeoMatchConstraintValue = "FR" GeoMatchConstraintValueGf GeoMatchConstraintValue = "GF" GeoMatchConstraintValuePf GeoMatchConstraintValue = "PF" GeoMatchConstraintValueTf GeoMatchConstraintValue = "TF" GeoMatchConstraintValueGa GeoMatchConstraintValue = "GA" GeoMatchConstraintValueGm GeoMatchConstraintValue = "GM" GeoMatchConstraintValueGe GeoMatchConstraintValue = "GE" GeoMatchConstraintValueDe GeoMatchConstraintValue = "DE" GeoMatchConstraintValueGh GeoMatchConstraintValue = "GH" GeoMatchConstraintValueGi GeoMatchConstraintValue = "GI" GeoMatchConstraintValueGr GeoMatchConstraintValue = "GR" GeoMatchConstraintValueGl GeoMatchConstraintValue = "GL" GeoMatchConstraintValueGd GeoMatchConstraintValue = "GD" GeoMatchConstraintValueGp GeoMatchConstraintValue = "GP" GeoMatchConstraintValueGu GeoMatchConstraintValue = "GU" GeoMatchConstraintValueGt GeoMatchConstraintValue = "GT" GeoMatchConstraintValueGg GeoMatchConstraintValue = "GG" GeoMatchConstraintValueGn GeoMatchConstraintValue = "GN" GeoMatchConstraintValueGw GeoMatchConstraintValue = "GW" GeoMatchConstraintValueGy GeoMatchConstraintValue = "GY" GeoMatchConstraintValueHt GeoMatchConstraintValue = "HT" GeoMatchConstraintValueHm GeoMatchConstraintValue = "HM" GeoMatchConstraintValueVa GeoMatchConstraintValue = "VA" GeoMatchConstraintValueHn GeoMatchConstraintValue = "HN" GeoMatchConstraintValueHk GeoMatchConstraintValue = "HK" GeoMatchConstraintValueHu GeoMatchConstraintValue = "HU" GeoMatchConstraintValueIs GeoMatchConstraintValue = "IS" GeoMatchConstraintValueIn GeoMatchConstraintValue = "IN" GeoMatchConstraintValueId GeoMatchConstraintValue = "ID" GeoMatchConstraintValueIr GeoMatchConstraintValue = "IR" GeoMatchConstraintValueIq GeoMatchConstraintValue = "IQ" GeoMatchConstraintValueIe GeoMatchConstraintValue = "IE" GeoMatchConstraintValueIm GeoMatchConstraintValue = "IM" GeoMatchConstraintValueIl GeoMatchConstraintValue = "IL" GeoMatchConstraintValueIt GeoMatchConstraintValue = "IT" GeoMatchConstraintValueJm GeoMatchConstraintValue = "JM" GeoMatchConstraintValueJp GeoMatchConstraintValue = "JP" GeoMatchConstraintValueJe GeoMatchConstraintValue = "JE" GeoMatchConstraintValueJo GeoMatchConstraintValue = "JO" GeoMatchConstraintValueKz GeoMatchConstraintValue = "KZ" GeoMatchConstraintValueKe GeoMatchConstraintValue = "KE" GeoMatchConstraintValueKi GeoMatchConstraintValue = "KI" GeoMatchConstraintValueKp GeoMatchConstraintValue = "KP" GeoMatchConstraintValueKr GeoMatchConstraintValue = "KR" GeoMatchConstraintValueKw GeoMatchConstraintValue = "KW" GeoMatchConstraintValueKg GeoMatchConstraintValue = "KG" GeoMatchConstraintValueLa GeoMatchConstraintValue = "LA" GeoMatchConstraintValueLv GeoMatchConstraintValue = "LV" GeoMatchConstraintValueLb GeoMatchConstraintValue = "LB" GeoMatchConstraintValueLs GeoMatchConstraintValue = "LS" GeoMatchConstraintValueLr GeoMatchConstraintValue = "LR" GeoMatchConstraintValueLy GeoMatchConstraintValue = "LY" GeoMatchConstraintValueLi GeoMatchConstraintValue = "LI" GeoMatchConstraintValueLt GeoMatchConstraintValue = "LT" GeoMatchConstraintValueLu GeoMatchConstraintValue = "LU" GeoMatchConstraintValueMo GeoMatchConstraintValue = "MO" GeoMatchConstraintValueMk GeoMatchConstraintValue = "MK" GeoMatchConstraintValueMg GeoMatchConstraintValue = "MG" GeoMatchConstraintValueMw GeoMatchConstraintValue = "MW" GeoMatchConstraintValueMy GeoMatchConstraintValue = "MY" GeoMatchConstraintValueMv GeoMatchConstraintValue = "MV" GeoMatchConstraintValueMl GeoMatchConstraintValue = "ML" GeoMatchConstraintValueMt GeoMatchConstraintValue = "MT" GeoMatchConstraintValueMh GeoMatchConstraintValue = "MH" GeoMatchConstraintValueMq GeoMatchConstraintValue = "MQ" GeoMatchConstraintValueMr GeoMatchConstraintValue = "MR" GeoMatchConstraintValueMu GeoMatchConstraintValue = "MU" GeoMatchConstraintValueYt GeoMatchConstraintValue = "YT" GeoMatchConstraintValueMx GeoMatchConstraintValue = "MX" GeoMatchConstraintValueFm GeoMatchConstraintValue = "FM" GeoMatchConstraintValueMd GeoMatchConstraintValue = "MD" GeoMatchConstraintValueMc GeoMatchConstraintValue = "MC" GeoMatchConstraintValueMn GeoMatchConstraintValue = "MN" GeoMatchConstraintValueMe GeoMatchConstraintValue = "ME" GeoMatchConstraintValueMs GeoMatchConstraintValue = "MS" GeoMatchConstraintValueMa GeoMatchConstraintValue = "MA" GeoMatchConstraintValueMz GeoMatchConstraintValue = "MZ" GeoMatchConstraintValueMm GeoMatchConstraintValue = "MM" GeoMatchConstraintValueNa GeoMatchConstraintValue = "NA" GeoMatchConstraintValueNr GeoMatchConstraintValue = "NR" GeoMatchConstraintValueNp GeoMatchConstraintValue = "NP" GeoMatchConstraintValueNl GeoMatchConstraintValue = "NL" GeoMatchConstraintValueNc GeoMatchConstraintValue = "NC" GeoMatchConstraintValueNz GeoMatchConstraintValue = "NZ" GeoMatchConstraintValueNi GeoMatchConstraintValue = "NI" GeoMatchConstraintValueNe GeoMatchConstraintValue = "NE" GeoMatchConstraintValueNg GeoMatchConstraintValue = "NG" GeoMatchConstraintValueNu GeoMatchConstraintValue = "NU" GeoMatchConstraintValueNf GeoMatchConstraintValue = "NF" GeoMatchConstraintValueMp GeoMatchConstraintValue = "MP" GeoMatchConstraintValueNo GeoMatchConstraintValue = "NO" GeoMatchConstraintValueOm GeoMatchConstraintValue = "OM" GeoMatchConstraintValuePk GeoMatchConstraintValue = "PK" GeoMatchConstraintValuePw GeoMatchConstraintValue = "PW" GeoMatchConstraintValuePs GeoMatchConstraintValue = "PS" GeoMatchConstraintValuePa GeoMatchConstraintValue = "PA" GeoMatchConstraintValuePg GeoMatchConstraintValue = "PG" GeoMatchConstraintValuePy GeoMatchConstraintValue = "PY" GeoMatchConstraintValuePe GeoMatchConstraintValue = "PE" GeoMatchConstraintValuePh GeoMatchConstraintValue = "PH" GeoMatchConstraintValuePn GeoMatchConstraintValue = "PN" GeoMatchConstraintValuePl GeoMatchConstraintValue = "PL" GeoMatchConstraintValuePt GeoMatchConstraintValue = "PT" GeoMatchConstraintValuePr GeoMatchConstraintValue = "PR" GeoMatchConstraintValueQa GeoMatchConstraintValue = "QA" GeoMatchConstraintValueRe GeoMatchConstraintValue = "RE" GeoMatchConstraintValueRo GeoMatchConstraintValue = "RO" GeoMatchConstraintValueRu GeoMatchConstraintValue = "RU" GeoMatchConstraintValueRw GeoMatchConstraintValue = "RW" GeoMatchConstraintValueBl GeoMatchConstraintValue = "BL" GeoMatchConstraintValueSh GeoMatchConstraintValue = "SH" GeoMatchConstraintValueKn GeoMatchConstraintValue = "KN" GeoMatchConstraintValueLc GeoMatchConstraintValue = "LC" GeoMatchConstraintValueMf GeoMatchConstraintValue = "MF" GeoMatchConstraintValuePm GeoMatchConstraintValue = "PM" GeoMatchConstraintValueVc GeoMatchConstraintValue = "VC" GeoMatchConstraintValueWs GeoMatchConstraintValue = "WS" GeoMatchConstraintValueSm GeoMatchConstraintValue = "SM" GeoMatchConstraintValueSt GeoMatchConstraintValue = "ST" GeoMatchConstraintValueSa GeoMatchConstraintValue = "SA" GeoMatchConstraintValueSn GeoMatchConstraintValue = "SN" GeoMatchConstraintValueRs GeoMatchConstraintValue = "RS" GeoMatchConstraintValueSc GeoMatchConstraintValue = "SC" GeoMatchConstraintValueSl GeoMatchConstraintValue = "SL" GeoMatchConstraintValueSg GeoMatchConstraintValue = "SG" GeoMatchConstraintValueSx GeoMatchConstraintValue = "SX" GeoMatchConstraintValueSk GeoMatchConstraintValue = "SK" GeoMatchConstraintValueSi GeoMatchConstraintValue = "SI" GeoMatchConstraintValueSb GeoMatchConstraintValue = "SB" GeoMatchConstraintValueSo GeoMatchConstraintValue = "SO" GeoMatchConstraintValueZa GeoMatchConstraintValue = "ZA" GeoMatchConstraintValueGs GeoMatchConstraintValue = "GS" GeoMatchConstraintValueSs GeoMatchConstraintValue = "SS" GeoMatchConstraintValueEs GeoMatchConstraintValue = "ES" GeoMatchConstraintValueLk GeoMatchConstraintValue = "LK" GeoMatchConstraintValueSd GeoMatchConstraintValue = "SD" GeoMatchConstraintValueSr GeoMatchConstraintValue = "SR" GeoMatchConstraintValueSj GeoMatchConstraintValue = "SJ" GeoMatchConstraintValueSz GeoMatchConstraintValue = "SZ" GeoMatchConstraintValueSe GeoMatchConstraintValue = "SE" GeoMatchConstraintValueCh GeoMatchConstraintValue = "CH" GeoMatchConstraintValueSy GeoMatchConstraintValue = "SY" GeoMatchConstraintValueTw GeoMatchConstraintValue = "TW" GeoMatchConstraintValueTj GeoMatchConstraintValue = "TJ" GeoMatchConstraintValueTz GeoMatchConstraintValue = "TZ" GeoMatchConstraintValueTh GeoMatchConstraintValue = "TH" GeoMatchConstraintValueTl GeoMatchConstraintValue = "TL" GeoMatchConstraintValueTg GeoMatchConstraintValue = "TG" GeoMatchConstraintValueTk GeoMatchConstraintValue = "TK" GeoMatchConstraintValueTo GeoMatchConstraintValue = "TO" GeoMatchConstraintValueTt GeoMatchConstraintValue = "TT" GeoMatchConstraintValueTn GeoMatchConstraintValue = "TN" GeoMatchConstraintValueTr GeoMatchConstraintValue = "TR" GeoMatchConstraintValueTm GeoMatchConstraintValue = "TM" GeoMatchConstraintValueTc GeoMatchConstraintValue = "TC" GeoMatchConstraintValueTv GeoMatchConstraintValue = "TV" GeoMatchConstraintValueUg GeoMatchConstraintValue = "UG" GeoMatchConstraintValueUa GeoMatchConstraintValue = "UA" GeoMatchConstraintValueAe GeoMatchConstraintValue = "AE" GeoMatchConstraintValueGb GeoMatchConstraintValue = "GB" GeoMatchConstraintValueUs GeoMatchConstraintValue = "US" GeoMatchConstraintValueUm GeoMatchConstraintValue = "UM" GeoMatchConstraintValueUy GeoMatchConstraintValue = "UY" GeoMatchConstraintValueUz GeoMatchConstraintValue = "UZ" GeoMatchConstraintValueVu GeoMatchConstraintValue = "VU" GeoMatchConstraintValueVe GeoMatchConstraintValue = "VE" GeoMatchConstraintValueVn GeoMatchConstraintValue = "VN" GeoMatchConstraintValueVg GeoMatchConstraintValue = "VG" GeoMatchConstraintValueVi GeoMatchConstraintValue = "VI" GeoMatchConstraintValueWf GeoMatchConstraintValue = "WF" GeoMatchConstraintValueEh GeoMatchConstraintValue = "EH" GeoMatchConstraintValueYe GeoMatchConstraintValue = "YE" GeoMatchConstraintValueZm GeoMatchConstraintValue = "ZM" GeoMatchConstraintValueZw GeoMatchConstraintValue = "ZW" ) // Values returns all known values for GeoMatchConstraintValue. Note that this can // be expanded in the future, and so it is only as up to date as the client. The // ordering of this slice is not guaranteed to be stable across updates. func (GeoMatchConstraintValue) Values() []GeoMatchConstraintValue { return []GeoMatchConstraintValue{ "AF", "AX", "AL", "DZ", "AS", "AD", "AO", "AI", "AQ", "AG", "AR", "AM", "AW", "AU", "AT", "AZ", "BS", "BH", "BD", "BB", "BY", "BE", "BZ", "BJ", "BM", "BT", "BO", "BQ", "BA", "BW", "BV", "BR", "IO", "BN", "BG", "BF", "BI", "KH", "CM", "CA", "CV", "KY", "CF", "TD", "CL", "CN", "CX", "CC", "CO", "KM", "CG", "CD", "CK", "CR", "CI", "HR", "CU", "CW", "CY", "CZ", "DK", "DJ", "DM", "DO", "EC", "EG", "SV", "GQ", "ER", "EE", "ET", "FK", "FO", "FJ", "FI", "FR", "GF", "PF", "TF", "GA", "GM", "GE", "DE", "GH", "GI", "GR", "GL", "GD", "GP", "GU", "GT", "GG", "GN", "GW", "GY", "HT", "HM", "VA", "HN", "HK", "HU", "IS", "IN", "ID", "IR", "IQ", "IE", "IM", "IL", "IT", "JM", "JP", "JE", "JO", "KZ", "KE", "KI", "KP", "KR", "KW", "KG", "LA", "LV", "LB", "LS", "LR", "LY", "LI", "LT", "LU", "MO", "MK", "MG", "MW", "MY", "MV", "ML", "MT", "MH", "MQ", "MR", "MU", "YT", "MX", "FM", "MD", "MC", "MN", "ME", "MS", "MA", "MZ", "MM", "NA", "NR", "NP", "NL", "NC", "NZ", "NI", "NE", "NG", "NU", "NF", "MP", "NO", "OM", "PK", "PW", "PS", "PA", "PG", "PY", "PE", "PH", "PN", "PL", "PT", "PR", "QA", "RE", "RO", "RU", "RW", "BL", "SH", "KN", "LC", "MF", "PM", "VC", "WS", "SM", "ST", "SA", "SN", "RS", "SC", "SL", "SG", "SX", "SK", "SI", "SB", "SO", "ZA", "GS", "SS", "ES", "LK", "SD", "SR", "SJ", "SZ", "SE", "CH", "SY", "TW", "TJ", "TZ", "TH", "TL", "TG", "TK", "TO", "TT", "TN", "TR", "TM", "TC", "TV", "UG", "UA", "AE", "GB", "US", "UM", "UY", "UZ", "VU", "VE", "VN", "VG", "VI", "WF", "EH", "YE", "ZM", "ZW", } } type IPSetDescriptorType string // Enum values for IPSetDescriptorType const ( IPSetDescriptorTypeIpv4 IPSetDescriptorType = "IPV4" IPSetDescriptorTypeIpv6 IPSetDescriptorType = "IPV6" ) // Values returns all known values for IPSetDescriptorType. Note that this can be // expanded in the future, and so it is only as up to date as the client. The // ordering of this slice is not guaranteed to be stable across updates. func (IPSetDescriptorType) Values() []IPSetDescriptorType { return []IPSetDescriptorType{ "IPV4", "IPV6", } } type MatchFieldType string // Enum values for MatchFieldType const ( MatchFieldTypeUri MatchFieldType = "URI" MatchFieldTypeQueryString MatchFieldType = "QUERY_STRING" MatchFieldTypeHeader MatchFieldType = "HEADER" MatchFieldTypeMethod MatchFieldType = "METHOD" MatchFieldTypeBody MatchFieldType = "BODY" MatchFieldTypeSingleQueryArg MatchFieldType = "SINGLE_QUERY_ARG" MatchFieldTypeAllQueryArgs MatchFieldType = "ALL_QUERY_ARGS" ) // Values returns all known values for MatchFieldType. Note that this can be // expanded in the future, and so it is only as up to date as the client. The // ordering of this slice is not guaranteed to be stable across updates. func (MatchFieldType) Values() []MatchFieldType { return []MatchFieldType{ "URI", "QUERY_STRING", "HEADER", "METHOD", "BODY", "SINGLE_QUERY_ARG", "ALL_QUERY_ARGS", } } type MigrationErrorType string // Enum values for MigrationErrorType const ( MigrationErrorTypeEntityNotSupported MigrationErrorType = "ENTITY_NOT_SUPPORTED" MigrationErrorTypeEntityNotFound MigrationErrorType = "ENTITY_NOT_FOUND" MigrationErrorTypeS3BucketNoPermission MigrationErrorType = "S3_BUCKET_NO_PERMISSION" MigrationErrorTypeS3BucketNotAccessible MigrationErrorType = "S3_BUCKET_NOT_ACCESSIBLE" MigrationErrorTypeS3BucketNotFound MigrationErrorType = "S3_BUCKET_NOT_FOUND" MigrationErrorTypeS3BucketInvalidRegion MigrationErrorType = "S3_BUCKET_INVALID_REGION" MigrationErrorTypeS3InternalError MigrationErrorType = "S3_INTERNAL_ERROR" ) // Values returns all known values for MigrationErrorType. Note that this can be // expanded in the future, and so it is only as up to date as the client. The // ordering of this slice is not guaranteed to be stable across updates. func (MigrationErrorType) Values() []MigrationErrorType { return []MigrationErrorType{ "ENTITY_NOT_SUPPORTED", "ENTITY_NOT_FOUND", "S3_BUCKET_NO_PERMISSION", "S3_BUCKET_NOT_ACCESSIBLE", "S3_BUCKET_NOT_FOUND", "S3_BUCKET_INVALID_REGION", "S3_INTERNAL_ERROR", } } type ParameterExceptionField string // Enum values for ParameterExceptionField const ( ParameterExceptionFieldChangeAction ParameterExceptionField = "CHANGE_ACTION" ParameterExceptionFieldWafAction ParameterExceptionField = "WAF_ACTION" ParameterExceptionFieldWafOverrideAction ParameterExceptionField = "WAF_OVERRIDE_ACTION" ParameterExceptionFieldPredicateType ParameterExceptionField = "PREDICATE_TYPE" ParameterExceptionFieldIpsetType ParameterExceptionField = "IPSET_TYPE" ParameterExceptionFieldByteMatchFieldType ParameterExceptionField = "BYTE_MATCH_FIELD_TYPE" ParameterExceptionFieldSqlInjectionMatchFieldType ParameterExceptionField = "SQL_INJECTION_MATCH_FIELD_TYPE" ParameterExceptionFieldByteMatchTextTransformation ParameterExceptionField = "BYTE_MATCH_TEXT_TRANSFORMATION" ParameterExceptionFieldByteMatchPositionalConstraint ParameterExceptionField = "BYTE_MATCH_POSITIONAL_CONSTRAINT" ParameterExceptionFieldSizeConstraintComparisonOperator ParameterExceptionField = "SIZE_CONSTRAINT_COMPARISON_OPERATOR" ParameterExceptionFieldGeoMatchLocationType ParameterExceptionField = "GEO_MATCH_LOCATION_TYPE" ParameterExceptionFieldGeoMatchLocationValue ParameterExceptionField = "GEO_MATCH_LOCATION_VALUE" ParameterExceptionFieldRateKey ParameterExceptionField = "RATE_KEY" ParameterExceptionFieldRuleType ParameterExceptionField = "RULE_TYPE" ParameterExceptionFieldNextMarker ParameterExceptionField = "NEXT_MARKER" ParameterExceptionFieldResourceArn ParameterExceptionField = "RESOURCE_ARN" ParameterExceptionFieldTags ParameterExceptionField = "TAGS" ParameterExceptionFieldTagKeys ParameterExceptionField = "TAG_KEYS" ) // Values returns all known values for ParameterExceptionField. Note that this can // be expanded in the future, and so it is only as up to date as the client. The // ordering of this slice is not guaranteed to be stable across updates. func (ParameterExceptionField) Values() []ParameterExceptionField { return []ParameterExceptionField{ "CHANGE_ACTION", "WAF_ACTION", "WAF_OVERRIDE_ACTION", "PREDICATE_TYPE", "IPSET_TYPE", "BYTE_MATCH_FIELD_TYPE", "SQL_INJECTION_MATCH_FIELD_TYPE", "BYTE_MATCH_TEXT_TRANSFORMATION", "BYTE_MATCH_POSITIONAL_CONSTRAINT", "SIZE_CONSTRAINT_COMPARISON_OPERATOR", "GEO_MATCH_LOCATION_TYPE", "GEO_MATCH_LOCATION_VALUE", "RATE_KEY", "RULE_TYPE", "NEXT_MARKER", "RESOURCE_ARN", "TAGS", "TAG_KEYS", } } type ParameterExceptionReason string // Enum values for ParameterExceptionReason const ( ParameterExceptionReasonInvalidOption ParameterExceptionReason = "INVALID_OPTION" ParameterExceptionReasonIllegalCombination ParameterExceptionReason = "ILLEGAL_COMBINATION" ParameterExceptionReasonIllegalArgument ParameterExceptionReason = "ILLEGAL_ARGUMENT" ParameterExceptionReasonInvalidTagKey ParameterExceptionReason = "INVALID_TAG_KEY" ) // Values returns all known values for ParameterExceptionReason. Note that this // can be expanded in the future, and so it is only as up to date as the client. // The ordering of this slice is not guaranteed to be stable across updates. func (ParameterExceptionReason) Values() []ParameterExceptionReason { return []ParameterExceptionReason{ "INVALID_OPTION", "ILLEGAL_COMBINATION", "ILLEGAL_ARGUMENT", "INVALID_TAG_KEY", } } type PositionalConstraint string // Enum values for PositionalConstraint const ( PositionalConstraintExactly PositionalConstraint = "EXACTLY" PositionalConstraintStartsWith PositionalConstraint = "STARTS_WITH" PositionalConstraintEndsWith PositionalConstraint = "ENDS_WITH" PositionalConstraintContains PositionalConstraint = "CONTAINS" PositionalConstraintContainsWord PositionalConstraint = "CONTAINS_WORD" ) // Values returns all known values for PositionalConstraint. Note that this can be // expanded in the future, and so it is only as up to date as the client. The // ordering of this slice is not guaranteed to be stable across updates. func (PositionalConstraint) Values() []PositionalConstraint { return []PositionalConstraint{ "EXACTLY", "STARTS_WITH", "ENDS_WITH", "CONTAINS", "CONTAINS_WORD", } } type PredicateType string // Enum values for PredicateType const ( PredicateTypeIpMatch PredicateType = "IPMatch" PredicateTypeByteMatch PredicateType = "ByteMatch" PredicateTypeSqlInjectionMatch PredicateType = "SqlInjectionMatch" PredicateTypeGeoMatch PredicateType = "GeoMatch" PredicateTypeSizeConstraint PredicateType = "SizeConstraint" PredicateTypeXssMatch PredicateType = "XssMatch" PredicateTypeRegexMatch PredicateType = "RegexMatch" ) // Values returns all known values for PredicateType. Note that this can be // expanded in the future, and so it is only as up to date as the client. The // ordering of this slice is not guaranteed to be stable across updates. func (PredicateType) Values() []PredicateType { return []PredicateType{ "IPMatch", "ByteMatch", "SqlInjectionMatch", "GeoMatch", "SizeConstraint", "XssMatch", "RegexMatch", } } type RateKey string // Enum values for RateKey const ( RateKeyIp RateKey = "IP" ) // Values returns all known values for RateKey. Note that this can be expanded in // the future, and so it is only as up to date as the client. The ordering of this // slice is not guaranteed to be stable across updates. func (RateKey) Values() []RateKey { return []RateKey{ "IP", } } type TextTransformation string // Enum values for TextTransformation const ( TextTransformationNone TextTransformation = "NONE" TextTransformationCompressWhiteSpace TextTransformation = "COMPRESS_WHITE_SPACE" TextTransformationHtmlEntityDecode TextTransformation = "HTML_ENTITY_DECODE" TextTransformationLowercase TextTransformation = "LOWERCASE" TextTransformationCmdLine TextTransformation = "CMD_LINE" TextTransformationUrlDecode TextTransformation = "URL_DECODE" ) // Values returns all known values for TextTransformation. Note that this can be // expanded in the future, and so it is only as up to date as the client. The // ordering of this slice is not guaranteed to be stable across updates. func (TextTransformation) Values() []TextTransformation { return []TextTransformation{ "NONE", "COMPRESS_WHITE_SPACE", "HTML_ENTITY_DECODE", "LOWERCASE", "CMD_LINE", "URL_DECODE", } } type WafActionType string // Enum values for WafActionType const ( WafActionTypeBlock WafActionType = "BLOCK" WafActionTypeAllow WafActionType = "ALLOW" WafActionTypeCount WafActionType = "COUNT" ) // Values returns all known values for WafActionType. Note that this can be // expanded in the future, and so it is only as up to date as the client. The // ordering of this slice is not guaranteed to be stable across updates. func (WafActionType) Values() []WafActionType { return []WafActionType{ "BLOCK", "ALLOW", "COUNT", } } type WafOverrideActionType string // Enum values for WafOverrideActionType const ( WafOverrideActionTypeNone WafOverrideActionType = "NONE" WafOverrideActionTypeCount WafOverrideActionType = "COUNT" ) // Values returns all known values for WafOverrideActionType. Note that this can // be expanded in the future, and so it is only as up to date as the client. The // ordering of this slice is not guaranteed to be stable across updates. func (WafOverrideActionType) Values() []WafOverrideActionType { return []WafOverrideActionType{ "NONE", "COUNT", } } type WafRuleType string // Enum values for WafRuleType const ( WafRuleTypeRegular WafRuleType = "REGULAR" WafRuleTypeRateBased WafRuleType = "RATE_BASED" WafRuleTypeGroup WafRuleType = "GROUP" ) // Values returns all known values for WafRuleType. Note that this can be expanded // in the future, and so it is only as up to date as the client. The ordering of // this slice is not guaranteed to be stable across updates. func (WafRuleType) Values() []WafRuleType { return []WafRuleType{ "REGULAR", "RATE_BASED", "GROUP", } }
894
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package types import ( "fmt" smithy "github.com/aws/smithy-go" ) type WAFBadRequestException struct { Message *string ErrorCodeOverride *string noSmithyDocumentSerde } func (e *WAFBadRequestException) Error() string { return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) } func (e *WAFBadRequestException) ErrorMessage() string { if e.Message == nil { return "" } return *e.Message } func (e *WAFBadRequestException) ErrorCode() string { if e == nil || e.ErrorCodeOverride == nil { return "WAFBadRequestException" } return *e.ErrorCodeOverride } func (e *WAFBadRequestException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } // The name specified is invalid. type WAFDisallowedNameException struct { Message *string ErrorCodeOverride *string noSmithyDocumentSerde } func (e *WAFDisallowedNameException) Error() string { return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) } func (e *WAFDisallowedNameException) ErrorMessage() string { if e.Message == nil { return "" } return *e.Message } func (e *WAFDisallowedNameException) ErrorCode() string { if e == nil || e.ErrorCodeOverride == nil { return "WAFDisallowedNameException" } return *e.ErrorCodeOverride } func (e *WAFDisallowedNameException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } // The operation failed due to a problem with the migration. The failure cause is // provided in the exception, in the MigrationErrorType : // - ENTITY_NOT_SUPPORTED - The web ACL has an unsupported entity but the // IgnoreUnsupportedType is not set to true. // - ENTITY_NOT_FOUND - The web ACL doesn't exist. // - S3_BUCKET_NO_PERMISSION - You don't have permission to perform the PutObject // action to the specified Amazon S3 bucket. // - S3_BUCKET_NOT_ACCESSIBLE - The bucket policy doesn't allow AWS WAF to // perform the PutObject action in the bucket. // - S3_BUCKET_NOT_FOUND - The S3 bucket doesn't exist. // - S3_BUCKET_INVALID_REGION - The S3 bucket is not in the same Region as the // web ACL. // - S3_INTERNAL_ERROR - AWS WAF failed to create the template in the S3 bucket // for another reason. type WAFEntityMigrationException struct { Message *string ErrorCodeOverride *string MigrationErrorType MigrationErrorType MigrationErrorReason *string noSmithyDocumentSerde } func (e *WAFEntityMigrationException) Error() string { return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) } func (e *WAFEntityMigrationException) ErrorMessage() string { if e.Message == nil { return "" } return *e.Message } func (e *WAFEntityMigrationException) ErrorCode() string { if e == nil || e.ErrorCodeOverride == nil { return "WAFEntityMigrationException" } return *e.ErrorCodeOverride } func (e *WAFEntityMigrationException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } // The operation failed because of a system problem, even though the request was // valid. Retry your request. type WAFInternalErrorException struct { Message *string ErrorCodeOverride *string noSmithyDocumentSerde } func (e *WAFInternalErrorException) Error() string { return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) } func (e *WAFInternalErrorException) ErrorMessage() string { if e.Message == nil { return "" } return *e.Message } func (e *WAFInternalErrorException) ErrorCode() string { if e == nil || e.ErrorCodeOverride == nil { return "WAFInternalErrorException" } return *e.ErrorCodeOverride } func (e *WAFInternalErrorException) ErrorFault() smithy.ErrorFault { return smithy.FaultServer } // The operation failed because you tried to create, update, or delete an object // by using an invalid account identifier. type WAFInvalidAccountException struct { Message *string ErrorCodeOverride *string noSmithyDocumentSerde } func (e *WAFInvalidAccountException) Error() string { return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) } func (e *WAFInvalidAccountException) ErrorMessage() string { if e.Message == nil { return "" } return *e.Message } func (e *WAFInvalidAccountException) ErrorCode() string { if e == nil || e.ErrorCodeOverride == nil { return "WAFInvalidAccountException" } return *e.ErrorCodeOverride } func (e *WAFInvalidAccountException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } // The operation failed because there was nothing to do. For example: // - You tried to remove a Rule from a WebACL , but the Rule isn't in the // specified WebACL . // - You tried to remove an IP address from an IPSet , but the IP address isn't // in the specified IPSet . // - You tried to remove a ByteMatchTuple from a ByteMatchSet , but the // ByteMatchTuple isn't in the specified WebACL . // - You tried to add a Rule to a WebACL , but the Rule already exists in the // specified WebACL . // - You tried to add a ByteMatchTuple to a ByteMatchSet , but the ByteMatchTuple // already exists in the specified WebACL . type WAFInvalidOperationException struct { Message *string ErrorCodeOverride *string noSmithyDocumentSerde } func (e *WAFInvalidOperationException) Error() string { return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) } func (e *WAFInvalidOperationException) ErrorMessage() string { if e.Message == nil { return "" } return *e.Message } func (e *WAFInvalidOperationException) ErrorCode() string { if e == nil || e.ErrorCodeOverride == nil { return "WAFInvalidOperationException" } return *e.ErrorCodeOverride } func (e *WAFInvalidOperationException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } // The operation failed because AWS WAF didn't recognize a parameter in the // request. For example: // - You specified an invalid parameter name. // - You specified an invalid value. // - You tried to update an object ( ByteMatchSet , IPSet , Rule , or WebACL ) // using an action other than INSERT or DELETE . // - You tried to create a WebACL with a DefaultAction Type other than ALLOW , // BLOCK , or COUNT . // - You tried to create a RateBasedRule with a RateKey value other than IP . // - You tried to update a WebACL with a WafAction Type other than ALLOW , BLOCK // , or COUNT . // - You tried to update a ByteMatchSet with a FieldToMatch Type other than // HEADER, METHOD, QUERY_STRING, URI, or BODY. // - You tried to update a ByteMatchSet with a Field of HEADER but no value for // Data . // - Your request references an ARN that is malformed, or corresponds to a // resource with which a web ACL cannot be associated. type WAFInvalidParameterException struct { Message *string ErrorCodeOverride *string Field ParameterExceptionField Parameter *string Reason ParameterExceptionReason noSmithyDocumentSerde } func (e *WAFInvalidParameterException) Error() string { return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) } func (e *WAFInvalidParameterException) ErrorMessage() string { if e.Message == nil { return "" } return *e.Message } func (e *WAFInvalidParameterException) ErrorCode() string { if e == nil || e.ErrorCodeOverride == nil { return "WAFInvalidParameterException" } return *e.ErrorCodeOverride } func (e *WAFInvalidParameterException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } // The operation failed because the specified policy is not in the proper format. // The policy is subject to the following restrictions: // - You can attach only one policy with each PutPermissionPolicy request. // - The policy must include an Effect , Action and Principal . // - Effect must specify Allow . // - The Action in the policy must be waf:UpdateWebACL , // waf-regional:UpdateWebACL , waf:GetRuleGroup and waf-regional:GetRuleGroup . // Any extra or wildcard actions in the policy will be rejected. // - The policy cannot include a Resource parameter. // - The ARN in the request must be a valid WAF RuleGroup ARN and the RuleGroup // must exist in the same region. // - The user making the request must be the owner of the RuleGroup. // - Your policy must be composed using IAM Policy version 2012-10-17. type WAFInvalidPermissionPolicyException struct { Message *string ErrorCodeOverride *string noSmithyDocumentSerde } func (e *WAFInvalidPermissionPolicyException) Error() string { return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) } func (e *WAFInvalidPermissionPolicyException) ErrorMessage() string { if e.Message == nil { return "" } return *e.Message } func (e *WAFInvalidPermissionPolicyException) ErrorCode() string { if e == nil || e.ErrorCodeOverride == nil { return "WAFInvalidPermissionPolicyException" } return *e.ErrorCodeOverride } func (e *WAFInvalidPermissionPolicyException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } // The regular expression (regex) you specified in RegexPatternString is invalid. type WAFInvalidRegexPatternException struct { Message *string ErrorCodeOverride *string noSmithyDocumentSerde } func (e *WAFInvalidRegexPatternException) Error() string { return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) } func (e *WAFInvalidRegexPatternException) ErrorMessage() string { if e.Message == nil { return "" } return *e.Message } func (e *WAFInvalidRegexPatternException) ErrorCode() string { if e == nil || e.ErrorCodeOverride == nil { return "WAFInvalidRegexPatternException" } return *e.ErrorCodeOverride } func (e *WAFInvalidRegexPatternException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } // The operation exceeds a resource limit, for example, the maximum number of // WebACL objects that you can create for an AWS account. For more information, see // Limits (https://docs.aws.amazon.com/waf/latest/developerguide/limits.html) in // the AWS WAF Developer Guide. type WAFLimitsExceededException struct { Message *string ErrorCodeOverride *string noSmithyDocumentSerde } func (e *WAFLimitsExceededException) Error() string { return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) } func (e *WAFLimitsExceededException) ErrorMessage() string { if e.Message == nil { return "" } return *e.Message } func (e *WAFLimitsExceededException) ErrorCode() string { if e == nil || e.ErrorCodeOverride == nil { return "WAFLimitsExceededException" } return *e.ErrorCodeOverride } func (e *WAFLimitsExceededException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } // The operation failed because you tried to delete an object that isn't empty. // For example: // - You tried to delete a WebACL that still contains one or more Rule objects. // - You tried to delete a Rule that still contains one or more ByteMatchSet // objects or other predicates. // - You tried to delete a ByteMatchSet that contains one or more ByteMatchTuple // objects. // - You tried to delete an IPSet that references one or more IP addresses. type WAFNonEmptyEntityException struct { Message *string ErrorCodeOverride *string noSmithyDocumentSerde } func (e *WAFNonEmptyEntityException) Error() string { return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) } func (e *WAFNonEmptyEntityException) ErrorMessage() string { if e.Message == nil { return "" } return *e.Message } func (e *WAFNonEmptyEntityException) ErrorCode() string { if e == nil || e.ErrorCodeOverride == nil { return "WAFNonEmptyEntityException" } return *e.ErrorCodeOverride } func (e *WAFNonEmptyEntityException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } // The operation failed because you tried to add an object to or delete an object // from another object that doesn't exist. For example: // - You tried to add a Rule to or delete a Rule from a WebACL that doesn't // exist. // - You tried to add a ByteMatchSet to or delete a ByteMatchSet from a Rule that // doesn't exist. // - You tried to add an IP address to or delete an IP address from an IPSet that // doesn't exist. // - You tried to add a ByteMatchTuple to or delete a ByteMatchTuple from a // ByteMatchSet that doesn't exist. type WAFNonexistentContainerException struct { Message *string ErrorCodeOverride *string noSmithyDocumentSerde } func (e *WAFNonexistentContainerException) Error() string { return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) } func (e *WAFNonexistentContainerException) ErrorMessage() string { if e.Message == nil { return "" } return *e.Message } func (e *WAFNonexistentContainerException) ErrorCode() string { if e == nil || e.ErrorCodeOverride == nil { return "WAFNonexistentContainerException" } return *e.ErrorCodeOverride } func (e *WAFNonexistentContainerException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } // The operation failed because the referenced object doesn't exist. type WAFNonexistentItemException struct { Message *string ErrorCodeOverride *string noSmithyDocumentSerde } func (e *WAFNonexistentItemException) Error() string { return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) } func (e *WAFNonexistentItemException) ErrorMessage() string { if e.Message == nil { return "" } return *e.Message } func (e *WAFNonexistentItemException) ErrorCode() string { if e == nil || e.ErrorCodeOverride == nil { return "WAFNonexistentItemException" } return *e.ErrorCodeOverride } func (e *WAFNonexistentItemException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } // The operation failed because you tried to delete an object that is still in // use. For example: // - You tried to delete a ByteMatchSet that is still referenced by a Rule . // - You tried to delete a Rule that is still referenced by a WebACL . type WAFReferencedItemException struct { Message *string ErrorCodeOverride *string noSmithyDocumentSerde } func (e *WAFReferencedItemException) Error() string { return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) } func (e *WAFReferencedItemException) ErrorMessage() string { if e.Message == nil { return "" } return *e.Message } func (e *WAFReferencedItemException) ErrorCode() string { if e == nil || e.ErrorCodeOverride == nil { return "WAFReferencedItemException" } return *e.ErrorCodeOverride } func (e *WAFReferencedItemException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } // AWS WAF is not able to access the service linked role. This can be caused by a // previous PutLoggingConfiguration request, which can lock the service linked // role for about 20 seconds. Please try your request again. The service linked // role can also be locked by a previous DeleteServiceLinkedRole request, which // can lock the role for 15 minutes or more. If you recently made a // DeleteServiceLinkedRole , wait at least 15 minutes and try the request again. If // you receive this same exception again, you will have to wait additional time // until the role is unlocked. type WAFServiceLinkedRoleErrorException struct { Message *string ErrorCodeOverride *string noSmithyDocumentSerde } func (e *WAFServiceLinkedRoleErrorException) Error() string { return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) } func (e *WAFServiceLinkedRoleErrorException) ErrorMessage() string { if e.Message == nil { return "" } return *e.Message } func (e *WAFServiceLinkedRoleErrorException) ErrorCode() string { if e == nil || e.ErrorCodeOverride == nil { return "WAFServiceLinkedRoleErrorException" } return *e.ErrorCodeOverride } func (e *WAFServiceLinkedRoleErrorException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } // The operation failed because you tried to create, update, or delete an object // by using a change token that has already been used. type WAFStaleDataException struct { Message *string ErrorCodeOverride *string noSmithyDocumentSerde } func (e *WAFStaleDataException) Error() string { return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) } func (e *WAFStaleDataException) ErrorMessage() string { if e.Message == nil { return "" } return *e.Message } func (e *WAFStaleDataException) ErrorCode() string { if e == nil || e.ErrorCodeOverride == nil { return "WAFStaleDataException" } return *e.ErrorCodeOverride } func (e *WAFStaleDataException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } // The specified subscription does not exist. type WAFSubscriptionNotFoundException struct { Message *string ErrorCodeOverride *string noSmithyDocumentSerde } func (e *WAFSubscriptionNotFoundException) Error() string { return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) } func (e *WAFSubscriptionNotFoundException) ErrorMessage() string { if e.Message == nil { return "" } return *e.Message } func (e *WAFSubscriptionNotFoundException) ErrorCode() string { if e == nil || e.ErrorCodeOverride == nil { return "WAFSubscriptionNotFoundException" } return *e.ErrorCodeOverride } func (e *WAFSubscriptionNotFoundException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } type WAFTagOperationException struct { Message *string ErrorCodeOverride *string noSmithyDocumentSerde } func (e *WAFTagOperationException) Error() string { return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) } func (e *WAFTagOperationException) ErrorMessage() string { if e.Message == nil { return "" } return *e.Message } func (e *WAFTagOperationException) ErrorCode() string { if e == nil || e.ErrorCodeOverride == nil { return "WAFTagOperationException" } return *e.ErrorCodeOverride } func (e *WAFTagOperationException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } type WAFTagOperationInternalErrorException struct { Message *string ErrorCodeOverride *string noSmithyDocumentSerde } func (e *WAFTagOperationInternalErrorException) Error() string { return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) } func (e *WAFTagOperationInternalErrorException) ErrorMessage() string { if e.Message == nil { return "" } return *e.Message } func (e *WAFTagOperationInternalErrorException) ErrorCode() string { if e == nil || e.ErrorCodeOverride == nil { return "WAFTagOperationInternalErrorException" } return *e.ErrorCodeOverride } func (e *WAFTagOperationInternalErrorException) ErrorFault() smithy.ErrorFault { return smithy.FaultServer }
596
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package types import ( smithydocument "github.com/aws/smithy-go/document" "time" ) // This is AWS WAF Classic documentation. For more information, see AWS WAF Classic (https://docs.aws.amazon.com/waf/latest/developerguide/classic-waf-chapter.html) // in the developer guide. For the latest version of AWS WAF, use the AWS WAFV2 API // and see the AWS WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html) // . With the latest version, AWS WAF has a single set of endpoints for regional // and global use. The ActivatedRule object in an UpdateWebACL request specifies a // Rule that you want to insert or delete, the priority of the Rule in the WebACL , // and the action that you want AWS WAF to take when a web request matches the Rule // ( ALLOW , BLOCK , or COUNT ). To specify whether to insert or delete a Rule , // use the Action parameter in the WebACLUpdate data type. type ActivatedRule struct { // Specifies the order in which the Rules in a WebACL are evaluated. Rules with a // lower value for Priority are evaluated before Rules with a higher value. The // value must be a unique integer. If you add multiple Rules to a WebACL , the // values don't need to be consecutive. // // This member is required. Priority *int32 // The RuleId for a Rule . You use RuleId to get more information about a Rule // (see GetRule ), update a Rule (see UpdateRule ), insert a Rule into a WebACL or // delete a one from a WebACL (see UpdateWebACL ), or delete a Rule from AWS WAF // (see DeleteRule ). RuleId is returned by CreateRule and by ListRules . // // This member is required. RuleId *string // Specifies the action that CloudFront or AWS WAF takes when a web request // matches the conditions in the Rule . Valid values for Action include the // following: // - ALLOW : CloudFront responds with the requested object. // - BLOCK : CloudFront responds with an HTTP 403 (Forbidden) status code. // - COUNT : AWS WAF increments a counter of requests that match the conditions // in the rule and then continues to inspect the web request based on the remaining // rules in the web ACL. // ActivatedRule|OverrideAction applies only when updating or adding a RuleGroup // to a WebACL . In this case, you do not use ActivatedRule|Action . For all other // update requests, ActivatedRule|Action is used instead of // ActivatedRule|OverrideAction . Action *WafAction // An array of rules to exclude from a rule group. This is applicable only when // the ActivatedRule refers to a RuleGroup . Sometimes it is necessary to // troubleshoot rule groups that are blocking traffic unexpectedly (false // positives). One troubleshooting technique is to identify the specific rule // within the rule group that is blocking the legitimate traffic and then disable // (exclude) that particular rule. You can exclude rules from both your own rule // groups and AWS Marketplace rule groups that have been associated with a web ACL. // Specifying ExcludedRules does not remove those rules from the rule group. // Rather, it changes the action for the rules to COUNT . Therefore, requests that // match an ExcludedRule are counted but not blocked. The RuleGroup owner will // receive COUNT metrics for each ExcludedRule . If you want to exclude rules from // a rule group that is already associated with a web ACL, perform the following // steps: // - Use the AWS WAF logs to identify the IDs of the rules that you want to // exclude. For more information about the logs, see Logging Web ACL Traffic // Information (https://docs.aws.amazon.com/waf/latest/developerguide/logging.html) // . // - Submit an UpdateWebACL request that has two actions: // - The first action deletes the existing rule group from the web ACL. That is, // in the UpdateWebACL request, the first Updates:Action should be DELETE and // Updates:ActivatedRule:RuleId should be the rule group that contains the rules // that you want to exclude. // - The second action inserts the same rule group back in, but specifying the // rules to exclude. That is, the second Updates:Action should be INSERT , // Updates:ActivatedRule:RuleId should be the rule group that you just removed, // and ExcludedRules should contain the rules that you want to exclude. ExcludedRules []ExcludedRule // Use the OverrideAction to test your RuleGroup . Any rule in a RuleGroup can // potentially block a request. If you set the OverrideAction to None , the // RuleGroup will block a request if any individual rule in the RuleGroup matches // the request and is configured to block that request. However if you first want // to test the RuleGroup , set the OverrideAction to Count . The RuleGroup will // then override any block action specified by individual rules contained within // the group. Instead of blocking matching requests, those requests will be // counted. You can view a record of counted requests using GetSampledRequests . // ActivatedRule|OverrideAction applies only when updating or adding a RuleGroup // to a WebACL . In this case you do not use ActivatedRule|Action . For all other // update requests, ActivatedRule|Action is used instead of // ActivatedRule|OverrideAction . OverrideAction *WafOverrideAction // The rule type, either REGULAR , as defined by Rule , RATE_BASED , as defined by // RateBasedRule , or GROUP , as defined by RuleGroup . The default is REGULAR. // Although this field is optional, be aware that if you try to add a RATE_BASED // rule to a web ACL without setting the type, the UpdateWebACL request will fail // because the request tries to add a REGULAR rule with the specified ID, which // does not exist. Type WafRuleType noSmithyDocumentSerde } // This is AWS WAF Classic documentation. For more information, see AWS WAF Classic (https://docs.aws.amazon.com/waf/latest/developerguide/classic-waf-chapter.html) // in the developer guide. For the latest version of AWS WAF, use the AWS WAFV2 API // and see the AWS WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html) // . With the latest version, AWS WAF has a single set of endpoints for regional // and global use. In a GetByteMatchSet request, ByteMatchSet is a complex type // that contains the ByteMatchSetId and Name of a ByteMatchSet , and the values // that you specified when you updated the ByteMatchSet . A complex type that // contains ByteMatchTuple objects, which specify the parts of web requests that // you want AWS WAF to inspect and the values that you want AWS WAF to search for. // If a ByteMatchSet contains more than one ByteMatchTuple object, a request needs // to match the settings in only one ByteMatchTuple to be considered a match. type ByteMatchSet struct { // The ByteMatchSetId for a ByteMatchSet . You use ByteMatchSetId to get // information about a ByteMatchSet (see GetByteMatchSet ), update a ByteMatchSet // (see UpdateByteMatchSet ), insert a ByteMatchSet into a Rule or delete one from // a Rule (see UpdateRule ), and delete a ByteMatchSet from AWS WAF (see // DeleteByteMatchSet ). ByteMatchSetId is returned by CreateByteMatchSet and by // ListByteMatchSets . // // This member is required. ByteMatchSetId *string // Specifies the bytes (typically a string that corresponds with ASCII characters) // that you want AWS WAF to search for in web requests, the location in requests // that you want AWS WAF to search, and other settings. // // This member is required. ByteMatchTuples []ByteMatchTuple // A friendly name or description of the ByteMatchSet . You can't change Name // after you create a ByteMatchSet . Name *string noSmithyDocumentSerde } // This is AWS WAF Classic documentation. For more information, see AWS WAF Classic (https://docs.aws.amazon.com/waf/latest/developerguide/classic-waf-chapter.html) // in the developer guide. For the latest version of AWS WAF, use the AWS WAFV2 API // and see the AWS WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html) // . With the latest version, AWS WAF has a single set of endpoints for regional // and global use. Returned by ListByteMatchSets . Each ByteMatchSetSummary object // includes the Name and ByteMatchSetId for one ByteMatchSet . type ByteMatchSetSummary struct { // The ByteMatchSetId for a ByteMatchSet . You use ByteMatchSetId to get // information about a ByteMatchSet , update a ByteMatchSet , remove a ByteMatchSet // from a Rule , and delete a ByteMatchSet from AWS WAF. ByteMatchSetId is // returned by CreateByteMatchSet and by ListByteMatchSets . // // This member is required. ByteMatchSetId *string // A friendly name or description of the ByteMatchSet . You can't change Name // after you create a ByteMatchSet . // // This member is required. Name *string noSmithyDocumentSerde } // This is AWS WAF Classic documentation. For more information, see AWS WAF Classic (https://docs.aws.amazon.com/waf/latest/developerguide/classic-waf-chapter.html) // in the developer guide. For the latest version of AWS WAF, use the AWS WAFV2 API // and see the AWS WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html) // . With the latest version, AWS WAF has a single set of endpoints for regional // and global use. In an UpdateByteMatchSet request, ByteMatchSetUpdate specifies // whether to insert or delete a ByteMatchTuple and includes the settings for the // ByteMatchTuple . type ByteMatchSetUpdate struct { // Specifies whether to insert or delete a ByteMatchTuple . // // This member is required. Action ChangeAction // Information about the part of a web request that you want AWS WAF to inspect // and the value that you want AWS WAF to search for. If you specify DELETE for // the value of Action , the ByteMatchTuple values must exactly match the values // in the ByteMatchTuple that you want to delete from the ByteMatchSet . // // This member is required. ByteMatchTuple *ByteMatchTuple noSmithyDocumentSerde } // This is AWS WAF Classic documentation. For more information, see AWS WAF Classic (https://docs.aws.amazon.com/waf/latest/developerguide/classic-waf-chapter.html) // in the developer guide. For the latest version of AWS WAF, use the AWS WAFV2 API // and see the AWS WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html) // . With the latest version, AWS WAF has a single set of endpoints for regional // and global use. The bytes (typically a string that corresponds with ASCII // characters) that you want AWS WAF to search for in web requests, the location in // requests that you want AWS WAF to search, and other settings. type ByteMatchTuple struct { // The part of a web request that you want AWS WAF to search, such as a specified // header or a query string. For more information, see FieldToMatch . // // This member is required. FieldToMatch *FieldToMatch // Within the portion of a web request that you want to search (for example, in // the query string, if any), specify where you want AWS WAF to search. Valid // values include the following: CONTAINS The specified part of the web request // must include the value of TargetString , but the location doesn't matter. // CONTAINS_WORD The specified part of the web request must include the value of // TargetString , and TargetString must contain only alphanumeric characters or // underscore (A-Z, a-z, 0-9, or _). In addition, TargetString must be a word, // which means one of the following: // - TargetString exactly matches the value of the specified part of the web // request, such as the value of a header. // - TargetString is at the beginning of the specified part of the web request // and is followed by a character other than an alphanumeric character or // underscore (_), for example, BadBot; . // - TargetString is at the end of the specified part of the web request and is // preceded by a character other than an alphanumeric character or underscore (_), // for example, ;BadBot . // - TargetString is in the middle of the specified part of the web request and // is preceded and followed by characters other than alphanumeric characters or // underscore (_), for example, -BadBot; . // EXACTLY The value of the specified part of the web request must exactly match // the value of TargetString . STARTS_WITH The value of TargetString must appear // at the beginning of the specified part of the web request. ENDS_WITH The value // of TargetString must appear at the end of the specified part of the web request. // // This member is required. PositionalConstraint PositionalConstraint // The value that you want AWS WAF to search for. AWS WAF searches for the // specified string in the part of web requests that you specified in FieldToMatch // . The maximum length of the value is 50 bytes. Valid values depend on the values // that you specified for FieldToMatch : // - HEADER : The value that you want AWS WAF to search for in the request header // that you specified in FieldToMatch , for example, the value of the User-Agent // or Referer header. // - METHOD : The HTTP method, which indicates the type of operation specified in // the request. CloudFront supports the following methods: DELETE , GET , HEAD , // OPTIONS , PATCH , POST , and PUT . // - QUERY_STRING : The value that you want AWS WAF to search for in the query // string, which is the part of a URL that appears after a ? character. // - URI : The value that you want AWS WAF to search for in the part of a URL // that identifies a resource, for example, /images/daily-ad.jpg . // - BODY : The part of a request that contains any additional data that you want // to send to your web server as the HTTP request body, such as data from a form. // The request body immediately follows the request headers. Note that only the // first 8192 bytes of the request body are forwarded to AWS WAF for inspection. // To allow or block requests based on the length of the body, you can create a // size constraint set. For more information, see CreateSizeConstraintSet . // - SINGLE_QUERY_ARG : The parameter in the query string that you will inspect, // such as UserName or SalesRegion. The maximum length for SINGLE_QUERY_ARG is 30 // characters. // - ALL_QUERY_ARGS : Similar to SINGLE_QUERY_ARG , but instead of inspecting a // single parameter, AWS WAF inspects all parameters within the query string for // the value or regex pattern that you specify in TargetString . // If TargetString includes alphabetic characters A-Z and a-z, note that the value // is case sensitive. If you're using the AWS WAF API Specify a base64-encoded // version of the value. The maximum length of the value before you base64-encode // it is 50 bytes. For example, suppose the value of Type is HEADER and the value // of Data is User-Agent . If you want to search the User-Agent header for the // value BadBot , you base64-encode BadBot using MIME base64-encoding and include // the resulting value, QmFkQm90 , in the value of TargetString . If you're using // the AWS CLI or one of the AWS SDKs The value that you want AWS WAF to search // for. The SDK automatically base64 encodes the value. // // This member is required. TargetString []byte // Text transformations eliminate some of the unusual formatting that attackers // use in web requests in an effort to bypass AWS WAF. If you specify a // transformation, AWS WAF performs the transformation on FieldToMatch before // inspecting it for a match. You can only specify a single type of // TextTransformation. CMD_LINE When you're concerned that attackers are injecting // an operating system command line command and using unusual formatting to // disguise some or all of the command, use this option to perform the following // transformations: // - Delete the following characters: \ " ' ^ // - Delete spaces before the following characters: / ( // - Replace the following characters with a space: , ; // - Replace multiple spaces with one space // - Convert uppercase letters (A-Z) to lowercase (a-z) // COMPRESS_WHITE_SPACE Use this option to replace the following characters with a // space character (decimal 32): // - \f, formfeed, decimal 12 // - \t, tab, decimal 9 // - \n, newline, decimal 10 // - \r, carriage return, decimal 13 // - \v, vertical tab, decimal 11 // - non-breaking space, decimal 160 // COMPRESS_WHITE_SPACE also replaces multiple spaces with one space. // HTML_ENTITY_DECODE Use this option to replace HTML-encoded characters with // unencoded characters. HTML_ENTITY_DECODE performs the following operations: // - Replaces (ampersand)quot; with " // - Replaces (ampersand)nbsp; with a non-breaking space, decimal 160 // - Replaces (ampersand)lt; with a "less than" symbol // - Replaces (ampersand)gt; with > // - Replaces characters that are represented in hexadecimal format, // (ampersand)#xhhhh; , with the corresponding characters // - Replaces characters that are represented in decimal format, // (ampersand)#nnnn; , with the corresponding characters // LOWERCASE Use this option to convert uppercase letters (A-Z) to lowercase // (a-z). URL_DECODE Use this option to decode a URL-encoded value. NONE Specify // NONE if you don't want to perform any text transformations. // // This member is required. TextTransformation TextTransformation noSmithyDocumentSerde } // This is AWS WAF Classic documentation. For more information, see AWS WAF Classic (https://docs.aws.amazon.com/waf/latest/developerguide/classic-waf-chapter.html) // in the developer guide. For the latest version of AWS WAF, use the AWS WAFV2 API // and see the AWS WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html) // . With the latest version, AWS WAF has a single set of endpoints for regional // and global use. The rule to exclude from a rule group. This is applicable only // when the ActivatedRule refers to a RuleGroup . The rule must belong to the // RuleGroup that is specified by the ActivatedRule . type ExcludedRule struct { // The unique identifier for the rule to exclude from the rule group. // // This member is required. RuleId *string noSmithyDocumentSerde } // This is AWS WAF Classic documentation. For more information, see AWS WAF Classic (https://docs.aws.amazon.com/waf/latest/developerguide/classic-waf-chapter.html) // in the developer guide. For the latest version of AWS WAF, use the AWS WAFV2 API // and see the AWS WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html) // . With the latest version, AWS WAF has a single set of endpoints for regional // and global use. Specifies where in a web request to look for TargetString . type FieldToMatch struct { // The part of the web request that you want AWS WAF to search for a specified // string. Parts of a request that you can search include the following: // - HEADER : A specified request header, for example, the value of the // User-Agent or Referer header. If you choose HEADER for the type, specify the // name of the header in Data . // - METHOD : The HTTP method, which indicated the type of operation that the // request is asking the origin to perform. Amazon CloudFront supports the // following methods: DELETE , GET , HEAD , OPTIONS , PATCH , POST , and PUT . // - QUERY_STRING : A query string, which is the part of a URL that appears after // a ? character, if any. // - URI : The part of a web request that identifies a resource, for example, // /images/daily-ad.jpg . // - BODY : The part of a request that contains any additional data that you want // to send to your web server as the HTTP request body, such as data from a form. // The request body immediately follows the request headers. Note that only the // first 8192 bytes of the request body are forwarded to AWS WAF for inspection. // To allow or block requests based on the length of the body, you can create a // size constraint set. For more information, see CreateSizeConstraintSet . // - SINGLE_QUERY_ARG : The parameter in the query string that you will inspect, // such as UserName or SalesRegion. The maximum length for SINGLE_QUERY_ARG is 30 // characters. // - ALL_QUERY_ARGS : Similar to SINGLE_QUERY_ARG , but rather than inspecting a // single parameter, AWS WAF will inspect all parameters within the query for the // value or regex pattern that you specify in TargetString . // // This member is required. Type MatchFieldType // When the value of Type is HEADER , enter the name of the header that you want // AWS WAF to search, for example, User-Agent or Referer . The name of the header // is not case sensitive. When the value of Type is SINGLE_QUERY_ARG , enter the // name of the parameter that you want AWS WAF to search, for example, UserName or // SalesRegion . The parameter name is not case sensitive. If the value of Type is // any other value, omit Data . Data *string noSmithyDocumentSerde } // This is AWS WAF Classic documentation. For more information, see AWS WAF Classic (https://docs.aws.amazon.com/waf/latest/developerguide/classic-waf-chapter.html) // in the developer guide. For the latest version of AWS WAF, use the AWS WAFV2 API // and see the AWS WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html) // . With the latest version, AWS WAF has a single set of endpoints for regional // and global use. The country from which web requests originate that you want AWS // WAF to search for. type GeoMatchConstraint struct { // The type of geographical area you want AWS WAF to search for. Currently Country // is the only valid value. // // This member is required. Type GeoMatchConstraintType // The country that you want AWS WAF to search for. // // This member is required. Value GeoMatchConstraintValue noSmithyDocumentSerde } // This is AWS WAF Classic documentation. For more information, see AWS WAF Classic (https://docs.aws.amazon.com/waf/latest/developerguide/classic-waf-chapter.html) // in the developer guide. For the latest version of AWS WAF, use the AWS WAFV2 API // and see the AWS WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html) // . With the latest version, AWS WAF has a single set of endpoints for regional // and global use. Contains one or more countries that AWS WAF will search for. type GeoMatchSet struct { // An array of GeoMatchConstraint objects, which contain the country that you want // AWS WAF to search for. // // This member is required. GeoMatchConstraints []GeoMatchConstraint // The GeoMatchSetId for an GeoMatchSet . You use GeoMatchSetId to get information // about a GeoMatchSet (see GeoMatchSet ), update a GeoMatchSet (see // UpdateGeoMatchSet ), insert a GeoMatchSet into a Rule or delete one from a Rule // (see UpdateRule ), and delete a GeoMatchSet from AWS WAF (see DeleteGeoMatchSet // ). GeoMatchSetId is returned by CreateGeoMatchSet and by ListGeoMatchSets . // // This member is required. GeoMatchSetId *string // A friendly name or description of the GeoMatchSet . You can't change the name of // an GeoMatchSet after you create it. Name *string noSmithyDocumentSerde } // This is AWS WAF Classic documentation. For more information, see AWS WAF Classic (https://docs.aws.amazon.com/waf/latest/developerguide/classic-waf-chapter.html) // in the developer guide. For the latest version of AWS WAF, use the AWS WAFV2 API // and see the AWS WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html) // . With the latest version, AWS WAF has a single set of endpoints for regional // and global use. Contains the identifier and the name of the GeoMatchSet . type GeoMatchSetSummary struct { // The GeoMatchSetId for an GeoMatchSet . You can use GeoMatchSetId in a // GetGeoMatchSet request to get detailed information about an GeoMatchSet . // // This member is required. GeoMatchSetId *string // A friendly name or description of the GeoMatchSet . You can't change the name of // an GeoMatchSet after you create it. // // This member is required. Name *string noSmithyDocumentSerde } // This is AWS WAF Classic documentation. For more information, see AWS WAF Classic (https://docs.aws.amazon.com/waf/latest/developerguide/classic-waf-chapter.html) // in the developer guide. For the latest version of AWS WAF, use the AWS WAFV2 API // and see the AWS WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html) // . With the latest version, AWS WAF has a single set of endpoints for regional // and global use. Specifies the type of update to perform to an GeoMatchSet with // UpdateGeoMatchSet . type GeoMatchSetUpdate struct { // Specifies whether to insert or delete a country with UpdateGeoMatchSet . // // This member is required. Action ChangeAction // The country from which web requests originate that you want AWS WAF to search // for. // // This member is required. GeoMatchConstraint *GeoMatchConstraint noSmithyDocumentSerde } // This is AWS WAF Classic documentation. For more information, see AWS WAF Classic (https://docs.aws.amazon.com/waf/latest/developerguide/classic-waf-chapter.html) // in the developer guide. For the latest version of AWS WAF, use the AWS WAFV2 API // and see the AWS WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html) // . With the latest version, AWS WAF has a single set of endpoints for regional // and global use. The response from a GetSampledRequests request includes an // HTTPHeader complex type that appears as Headers in the response syntax. // HTTPHeader contains the names and values of all of the headers that appear in // one of the web requests that were returned by GetSampledRequests . type HTTPHeader struct { // The name of one of the headers in the sampled web request. Name *string // The value of one of the headers in the sampled web request. Value *string noSmithyDocumentSerde } // This is AWS WAF Classic documentation. For more information, see AWS WAF Classic (https://docs.aws.amazon.com/waf/latest/developerguide/classic-waf-chapter.html) // in the developer guide. For the latest version of AWS WAF, use the AWS WAFV2 API // and see the AWS WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html) // . With the latest version, AWS WAF has a single set of endpoints for regional // and global use. The response from a GetSampledRequests request includes an // HTTPRequest complex type that appears as Request in the response syntax. // HTTPRequest contains information about one of the web requests that were // returned by GetSampledRequests . type HTTPRequest struct { // The IP address that the request originated from. If the WebACL is associated // with a CloudFront distribution, this is the value of one of the following fields // in CloudFront access logs: // - c-ip , if the viewer did not use an HTTP proxy or a load balancer to send // the request // - x-forwarded-for , if the viewer did use an HTTP proxy or a load balancer to // send the request ClientIP *string // The two-letter country code for the country that the request originated from. // For a current list of country codes, see the Wikipedia entry ISO 3166-1 alpha-2 (https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) // . Country *string // The HTTP version specified in the sampled web request, for example, HTTP/1.1 . HTTPVersion *string // A complex type that contains two values for each header in the sampled web // request: the name of the header and the value of the header. Headers []HTTPHeader // The HTTP method specified in the sampled web request. CloudFront supports the // following methods: DELETE , GET , HEAD , OPTIONS , PATCH , POST , and PUT . Method *string // The part of a web request that identifies the resource, for example, // /images/daily-ad.jpg . URI *string noSmithyDocumentSerde } // This is AWS WAF Classic documentation. For more information, see AWS WAF Classic (https://docs.aws.amazon.com/waf/latest/developerguide/classic-waf-chapter.html) // in the developer guide. For the latest version of AWS WAF, use the AWS WAFV2 API // and see the AWS WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html) // . With the latest version, AWS WAF has a single set of endpoints for regional // and global use. Contains one or more IP addresses or blocks of IP addresses // specified in Classless Inter-Domain Routing (CIDR) notation. AWS WAF supports // IPv4 address ranges: /8 and any range between /16 through /32. AWS WAF supports // IPv6 address ranges: /24, /32, /48, /56, /64, and /128. To specify an individual // IP address, you specify the four-part IP address followed by a /32 , for // example, 192.0.2.0/32. To block a range of IP addresses, you can specify /8 or // any range between /16 through /32 (for IPv4) or /24, /32, /48, /56, /64, or /128 // (for IPv6). For more information about CIDR notation, see the Wikipedia entry // Classless Inter-Domain Routing (https://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing) // . type IPSet struct { // The IP address type ( IPV4 or IPV6 ) and the IP address range (in CIDR notation) // that web requests originate from. If the WebACL is associated with a CloudFront // distribution and the viewer did not use an HTTP proxy or a load balancer to send // the request, this is the value of the c-ip field in the CloudFront access logs. // // This member is required. IPSetDescriptors []IPSetDescriptor // The IPSetId for an IPSet . You use IPSetId to get information about an IPSet // (see GetIPSet ), update an IPSet (see UpdateIPSet ), insert an IPSet into a Rule // or delete one from a Rule (see UpdateRule ), and delete an IPSet from AWS WAF // (see DeleteIPSet ). IPSetId is returned by CreateIPSet and by ListIPSets . // // This member is required. IPSetId *string // A friendly name or description of the IPSet . You can't change the name of an // IPSet after you create it. Name *string noSmithyDocumentSerde } // This is AWS WAF Classic documentation. For more information, see AWS WAF Classic (https://docs.aws.amazon.com/waf/latest/developerguide/classic-waf-chapter.html) // in the developer guide. For the latest version of AWS WAF, use the AWS WAFV2 API // and see the AWS WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html) // . With the latest version, AWS WAF has a single set of endpoints for regional // and global use. Specifies the IP address type ( IPV4 or IPV6 ) and the IP // address range (in CIDR format) that web requests originate from. type IPSetDescriptor struct { // Specify IPV4 or IPV6 . // // This member is required. Type IPSetDescriptorType // Specify an IPv4 address by using CIDR notation. For example: // - To configure AWS WAF to allow, block, or count requests that originated // from the IP address 192.0.2.44, specify 192.0.2.44/32 . // - To configure AWS WAF to allow, block, or count requests that originated // from IP addresses from 192.0.2.0 to 192.0.2.255, specify 192.0.2.0/24 . // For more information about CIDR notation, see the Wikipedia entry Classless // Inter-Domain Routing (https://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing) // . Specify an IPv6 address by using CIDR notation. For example: // - To configure AWS WAF to allow, block, or count requests that originated // from the IP address 1111:0000:0000:0000:0000:0000:0000:0111, specify // 1111:0000:0000:0000:0000:0000:0000:0111/128 . // - To configure AWS WAF to allow, block, or count requests that originated // from IP addresses 1111:0000:0000:0000:0000:0000:0000:0000 to // 1111:0000:0000:0000:ffff:ffff:ffff:ffff, specify // 1111:0000:0000:0000:0000:0000:0000:0000/64 . // // This member is required. Value *string noSmithyDocumentSerde } // This is AWS WAF Classic documentation. For more information, see AWS WAF Classic (https://docs.aws.amazon.com/waf/latest/developerguide/classic-waf-chapter.html) // in the developer guide. For the latest version of AWS WAF, use the AWS WAFV2 API // and see the AWS WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html) // . With the latest version, AWS WAF has a single set of endpoints for regional // and global use. Contains the identifier and the name of the IPSet . type IPSetSummary struct { // The IPSetId for an IPSet . You can use IPSetId in a GetIPSet request to get // detailed information about an IPSet . // // This member is required. IPSetId *string // A friendly name or description of the IPSet . You can't change the name of an // IPSet after you create it. // // This member is required. Name *string noSmithyDocumentSerde } // This is AWS WAF Classic documentation. For more information, see AWS WAF Classic (https://docs.aws.amazon.com/waf/latest/developerguide/classic-waf-chapter.html) // in the developer guide. For the latest version of AWS WAF, use the AWS WAFV2 API // and see the AWS WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html) // . With the latest version, AWS WAF has a single set of endpoints for regional // and global use. Specifies the type of update to perform to an IPSet with // UpdateIPSet . type IPSetUpdate struct { // Specifies whether to insert or delete an IP address with UpdateIPSet . // // This member is required. Action ChangeAction // The IP address type ( IPV4 or IPV6 ) and the IP address range (in CIDR notation) // that web requests originate from. // // This member is required. IPSetDescriptor *IPSetDescriptor noSmithyDocumentSerde } // This is AWS WAF Classic documentation. For more information, see AWS WAF Classic (https://docs.aws.amazon.com/waf/latest/developerguide/classic-waf-chapter.html) // in the developer guide. For the latest version of AWS WAF, use the AWS WAFV2 API // and see the AWS WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html) // . With the latest version, AWS WAF has a single set of endpoints for regional // and global use. The Amazon Kinesis Data Firehose, RedactedFields information, // and the web ACL Amazon Resource Name (ARN). type LoggingConfiguration struct { // An array of Amazon Kinesis Data Firehose ARNs. // // This member is required. LogDestinationConfigs []string // The Amazon Resource Name (ARN) of the web ACL that you want to associate with // LogDestinationConfigs . // // This member is required. ResourceArn *string // The parts of the request that you want redacted from the logs. For example, if // you redact the cookie field, the cookie field in the firehose will be xxx . RedactedFields []FieldToMatch noSmithyDocumentSerde } // This is AWS WAF Classic documentation. For more information, see AWS WAF Classic (https://docs.aws.amazon.com/waf/latest/developerguide/classic-waf-chapter.html) // in the developer guide. For the latest version of AWS WAF, use the AWS WAFV2 API // and see the AWS WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html) // . With the latest version, AWS WAF has a single set of endpoints for regional // and global use. Specifies the ByteMatchSet , IPSet , SqlInjectionMatchSet , // XssMatchSet , RegexMatchSet , GeoMatchSet , and SizeConstraintSet objects that // you want to add to a Rule and, for each object, indicates whether you want to // negate the settings, for example, requests that do NOT originate from the IP // address 192.0.2.44. type Predicate struct { // A unique identifier for a predicate in a Rule , such as ByteMatchSetId or // IPSetId . The ID is returned by the corresponding Create or List command. // // This member is required. DataId *string // Set Negated to False if you want AWS WAF to allow, block, or count requests // based on the settings in the specified ByteMatchSet , IPSet , // SqlInjectionMatchSet , XssMatchSet , RegexMatchSet , GeoMatchSet , or // SizeConstraintSet . For example, if an IPSet includes the IP address 192.0.2.44 // , AWS WAF will allow or block requests based on that IP address. Set Negated to // True if you want AWS WAF to allow or block a request based on the negation of // the settings in the ByteMatchSet , IPSet , SqlInjectionMatchSet , XssMatchSet , // RegexMatchSet , GeoMatchSet , or SizeConstraintSet . For example, if an IPSet // includes the IP address 192.0.2.44 , AWS WAF will allow, block, or count // requests based on all IP addresses except 192.0.2.44 . // // This member is required. Negated *bool // The type of predicate in a Rule , such as ByteMatch or IPSet . // // This member is required. Type PredicateType noSmithyDocumentSerde } // This is AWS WAF Classic documentation. For more information, see AWS WAF Classic (https://docs.aws.amazon.com/waf/latest/developerguide/classic-waf-chapter.html) // in the developer guide. For the latest version of AWS WAF, use the AWS WAFV2 API // and see the AWS WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html) // . With the latest version, AWS WAF has a single set of endpoints for regional // and global use. A RateBasedRule is identical to a regular Rule , with one // addition: a RateBasedRule counts the number of requests that arrive from a // specified IP address every five minutes. For example, based on recent requests // that you've seen from an attacker, you might create a RateBasedRule that // includes the following conditions: // - The requests come from 192.0.2.44. // - They contain the value BadBot in the User-Agent header. // // In the rule, you also define the rate limit as 1,000. Requests that meet both // of these conditions and exceed 1,000 requests every five minutes trigger the // rule's action (block or count), which is defined in the web ACL. type RateBasedRule struct { // The Predicates object contains one Predicate element for each ByteMatchSet , // IPSet , or SqlInjectionMatchSet object that you want to include in a // RateBasedRule . // // This member is required. MatchPredicates []Predicate // The field that AWS WAF uses to determine if requests are likely arriving from // single source and thus subject to rate monitoring. The only valid value for // RateKey is IP . IP indicates that requests arriving from the same IP address // are subject to the RateLimit that is specified in the RateBasedRule . // // This member is required. RateKey RateKey // The maximum number of requests, which have an identical value in the field // specified by the RateKey , allowed in a five-minute period. If the number of // requests exceeds the RateLimit and the other predicates specified in the rule // are also met, AWS WAF triggers the action that is specified for this rule. // // This member is required. RateLimit int64 // A unique identifier for a RateBasedRule . You use RuleId to get more // information about a RateBasedRule (see GetRateBasedRule ), update a // RateBasedRule (see UpdateRateBasedRule ), insert a RateBasedRule into a WebACL // or delete one from a WebACL (see UpdateWebACL ), or delete a RateBasedRule from // AWS WAF (see DeleteRateBasedRule ). // // This member is required. RuleId *string // A friendly name or description for the metrics for a RateBasedRule . The name // can contain only alphanumeric characters (A-Z, a-z, 0-9), with maximum length // 128 and minimum length one. It can't contain whitespace or metric names reserved // for AWS WAF, including "All" and "Default_Action." You can't change the name of // the metric after you create the RateBasedRule . MetricName *string // A friendly name or description for a RateBasedRule . You can't change the name // of a RateBasedRule after you create it. Name *string noSmithyDocumentSerde } // This is AWS WAF Classic documentation. For more information, see AWS WAF Classic (https://docs.aws.amazon.com/waf/latest/developerguide/classic-waf-chapter.html) // in the developer guide. For the latest version of AWS WAF, use the AWS WAFV2 API // and see the AWS WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html) // . With the latest version, AWS WAF has a single set of endpoints for regional // and global use. In a GetRegexMatchSet request, RegexMatchSet is a complex type // that contains the RegexMatchSetId and Name of a RegexMatchSet , and the values // that you specified when you updated the RegexMatchSet . The values are contained // in a RegexMatchTuple object, which specify the parts of web requests that you // want AWS WAF to inspect and the values that you want AWS WAF to search for. If a // RegexMatchSet contains more than one RegexMatchTuple object, a request needs to // match the settings in only one ByteMatchTuple to be considered a match. type RegexMatchSet struct { // A friendly name or description of the RegexMatchSet . You can't change Name // after you create a RegexMatchSet . Name *string // The RegexMatchSetId for a RegexMatchSet . You use RegexMatchSetId to get // information about a RegexMatchSet (see GetRegexMatchSet ), update a // RegexMatchSet (see UpdateRegexMatchSet ), insert a RegexMatchSet into a Rule or // delete one from a Rule (see UpdateRule ), and delete a RegexMatchSet from AWS // WAF (see DeleteRegexMatchSet ). RegexMatchSetId is returned by // CreateRegexMatchSet and by ListRegexMatchSets . RegexMatchSetId *string // Contains an array of RegexMatchTuple objects. Each RegexMatchTuple object // contains: // - The part of a web request that you want AWS WAF to inspect, such as a query // string or the value of the User-Agent header. // - The identifier of the pattern (a regular expression) that you want AWS WAF // to look for. For more information, see RegexPatternSet . // - Whether to perform any conversions on the request, such as converting it to // lowercase, before inspecting it for the specified string. RegexMatchTuples []RegexMatchTuple noSmithyDocumentSerde } // This is AWS WAF Classic documentation. For more information, see AWS WAF Classic (https://docs.aws.amazon.com/waf/latest/developerguide/classic-waf-chapter.html) // in the developer guide. For the latest version of AWS WAF, use the AWS WAFV2 API // and see the AWS WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html) // . With the latest version, AWS WAF has a single set of endpoints for regional // and global use. Returned by ListRegexMatchSets . Each RegexMatchSetSummary // object includes the Name and RegexMatchSetId for one RegexMatchSet . type RegexMatchSetSummary struct { // A friendly name or description of the RegexMatchSet . You can't change Name // after you create a RegexMatchSet . // // This member is required. Name *string // The RegexMatchSetId for a RegexMatchSet . You use RegexMatchSetId to get // information about a RegexMatchSet , update a RegexMatchSet , remove a // RegexMatchSet from a Rule , and delete a RegexMatchSet from AWS WAF. // RegexMatchSetId is returned by CreateRegexMatchSet and by ListRegexMatchSets . // // This member is required. RegexMatchSetId *string noSmithyDocumentSerde } // This is AWS WAF Classic documentation. For more information, see AWS WAF Classic (https://docs.aws.amazon.com/waf/latest/developerguide/classic-waf-chapter.html) // in the developer guide. For the latest version of AWS WAF, use the AWS WAFV2 API // and see the AWS WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html) // . With the latest version, AWS WAF has a single set of endpoints for regional // and global use. In an UpdateRegexMatchSet request, RegexMatchSetUpdate // specifies whether to insert or delete a RegexMatchTuple and includes the // settings for the RegexMatchTuple . type RegexMatchSetUpdate struct { // Specifies whether to insert or delete a RegexMatchTuple . // // This member is required. Action ChangeAction // Information about the part of a web request that you want AWS WAF to inspect // and the identifier of the regular expression (regex) pattern that you want AWS // WAF to search for. If you specify DELETE for the value of Action , the // RegexMatchTuple values must exactly match the values in the RegexMatchTuple // that you want to delete from the RegexMatchSet . // // This member is required. RegexMatchTuple *RegexMatchTuple noSmithyDocumentSerde } // This is AWS WAF Classic documentation. For more information, see AWS WAF Classic (https://docs.aws.amazon.com/waf/latest/developerguide/classic-waf-chapter.html) // in the developer guide. For the latest version of AWS WAF, use the AWS WAFV2 API // and see the AWS WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html) // . With the latest version, AWS WAF has a single set of endpoints for regional // and global use. The regular expression pattern that you want AWS WAF to search // for in web requests, the location in requests that you want AWS WAF to search, // and other settings. Each RegexMatchTuple object contains: // - The part of a web request that you want AWS WAF to inspect, such as a query // string or the value of the User-Agent header. // - The identifier of the pattern (a regular expression) that you want AWS WAF // to look for. For more information, see RegexPatternSet . // - Whether to perform any conversions on the request, such as converting it to // lowercase, before inspecting it for the specified string. type RegexMatchTuple struct { // Specifies where in a web request to look for the RegexPatternSet . // // This member is required. FieldToMatch *FieldToMatch // The RegexPatternSetId for a RegexPatternSet . You use RegexPatternSetId to get // information about a RegexPatternSet (see GetRegexPatternSet ), update a // RegexPatternSet (see UpdateRegexPatternSet ), insert a RegexPatternSet into a // RegexMatchSet or delete one from a RegexMatchSet (see UpdateRegexMatchSet ), and // delete an RegexPatternSet from AWS WAF (see DeleteRegexPatternSet ). // RegexPatternSetId is returned by CreateRegexPatternSet and by // ListRegexPatternSets . // // This member is required. RegexPatternSetId *string // Text transformations eliminate some of the unusual formatting that attackers // use in web requests in an effort to bypass AWS WAF. If you specify a // transformation, AWS WAF performs the transformation on RegexPatternSet before // inspecting a request for a match. You can only specify a single type of // TextTransformation. CMD_LINE When you're concerned that attackers are injecting // an operating system commandline command and using unusual formatting to disguise // some or all of the command, use this option to perform the following // transformations: // - Delete the following characters: \ " ' ^ // - Delete spaces before the following characters: / ( // - Replace the following characters with a space: , ; // - Replace multiple spaces with one space // - Convert uppercase letters (A-Z) to lowercase (a-z) // COMPRESS_WHITE_SPACE Use this option to replace the following characters with a // space character (decimal 32): // - \f, formfeed, decimal 12 // - \t, tab, decimal 9 // - \n, newline, decimal 10 // - \r, carriage return, decimal 13 // - \v, vertical tab, decimal 11 // - non-breaking space, decimal 160 // COMPRESS_WHITE_SPACE also replaces multiple spaces with one space. // HTML_ENTITY_DECODE Use this option to replace HTML-encoded characters with // unencoded characters. HTML_ENTITY_DECODE performs the following operations: // - Replaces (ampersand)quot; with " // - Replaces (ampersand)nbsp; with a non-breaking space, decimal 160 // - Replaces (ampersand)lt; with a "less than" symbol // - Replaces (ampersand)gt; with > // - Replaces characters that are represented in hexadecimal format, // (ampersand)#xhhhh; , with the corresponding characters // - Replaces characters that are represented in decimal format, // (ampersand)#nnnn; , with the corresponding characters // LOWERCASE Use this option to convert uppercase letters (A-Z) to lowercase // (a-z). URL_DECODE Use this option to decode a URL-encoded value. NONE Specify // NONE if you don't want to perform any text transformations. // // This member is required. TextTransformation TextTransformation noSmithyDocumentSerde } // This is AWS WAF Classic documentation. For more information, see AWS WAF Classic (https://docs.aws.amazon.com/waf/latest/developerguide/classic-waf-chapter.html) // in the developer guide. For the latest version of AWS WAF, use the AWS WAFV2 API // and see the AWS WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html) // . With the latest version, AWS WAF has a single set of endpoints for regional // and global use. The RegexPatternSet specifies the regular expression (regex) // pattern that you want AWS WAF to search for, such as B[a@]dB[o0]t . You can then // configure AWS WAF to reject those requests. type RegexPatternSet struct { // The identifier for the RegexPatternSet . You use RegexPatternSetId to get // information about a RegexPatternSet , update a RegexPatternSet , remove a // RegexPatternSet from a RegexMatchSet , and delete a RegexPatternSet from AWS // WAF. RegexMatchSetId is returned by CreateRegexPatternSet and by // ListRegexPatternSets . // // This member is required. RegexPatternSetId *string // Specifies the regular expression (regex) patterns that you want AWS WAF to // search for, such as B[a@]dB[o0]t . // // This member is required. RegexPatternStrings []string // A friendly name or description of the RegexPatternSet . You can't change Name // after you create a RegexPatternSet . Name *string noSmithyDocumentSerde } // This is AWS WAF Classic documentation. For more information, see AWS WAF Classic (https://docs.aws.amazon.com/waf/latest/developerguide/classic-waf-chapter.html) // in the developer guide. For the latest version of AWS WAF, use the AWS WAFV2 API // and see the AWS WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html) // . With the latest version, AWS WAF has a single set of endpoints for regional // and global use. Returned by ListRegexPatternSets . Each RegexPatternSetSummary // object includes the Name and RegexPatternSetId for one RegexPatternSet . type RegexPatternSetSummary struct { // A friendly name or description of the RegexPatternSet . You can't change Name // after you create a RegexPatternSet . // // This member is required. Name *string // The RegexPatternSetId for a RegexPatternSet . You use RegexPatternSetId to get // information about a RegexPatternSet , update a RegexPatternSet , remove a // RegexPatternSet from a RegexMatchSet , and delete a RegexPatternSet from AWS // WAF. RegexPatternSetId is returned by CreateRegexPatternSet and by // ListRegexPatternSets . // // This member is required. RegexPatternSetId *string noSmithyDocumentSerde } // This is AWS WAF Classic documentation. For more information, see AWS WAF Classic (https://docs.aws.amazon.com/waf/latest/developerguide/classic-waf-chapter.html) // in the developer guide. For the latest version of AWS WAF, use the AWS WAFV2 API // and see the AWS WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html) // . With the latest version, AWS WAF has a single set of endpoints for regional // and global use. In an UpdateRegexPatternSet request, RegexPatternSetUpdate // specifies whether to insert or delete a RegexPatternString and includes the // settings for the RegexPatternString . type RegexPatternSetUpdate struct { // Specifies whether to insert or delete a RegexPatternString . // // This member is required. Action ChangeAction // Specifies the regular expression (regex) pattern that you want AWS WAF to // search for, such as B[a@]dB[o0]t . // // This member is required. RegexPatternString *string noSmithyDocumentSerde } // This is AWS WAF Classic documentation. For more information, see AWS WAF Classic (https://docs.aws.amazon.com/waf/latest/developerguide/classic-waf-chapter.html) // in the developer guide. For the latest version of AWS WAF, use the AWS WAFV2 API // and see the AWS WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html) // . With the latest version, AWS WAF has a single set of endpoints for regional // and global use. A combination of ByteMatchSet , IPSet , and/or // SqlInjectionMatchSet objects that identify the web requests that you want to // allow, block, or count. For example, you might create a Rule that includes the // following predicates: // - An IPSet that causes AWS WAF to search for web requests that originate from // the IP address 192.0.2.44 // - A ByteMatchSet that causes AWS WAF to search for web requests for which the // value of the User-Agent header is BadBot . // // To match the settings in this Rule , a request must originate from 192.0.2.44 // AND include a User-Agent header for which the value is BadBot . type Rule struct { // The Predicates object contains one Predicate element for each ByteMatchSet , // IPSet , or SqlInjectionMatchSet object that you want to include in a Rule . // // This member is required. Predicates []Predicate // A unique identifier for a Rule . You use RuleId to get more information about a // Rule (see GetRule ), update a Rule (see UpdateRule ), insert a Rule into a // WebACL or delete a one from a WebACL (see UpdateWebACL ), or delete a Rule from // AWS WAF (see DeleteRule ). RuleId is returned by CreateRule and by ListRules . // // This member is required. RuleId *string // A friendly name or description for the metrics for this Rule . The name can // contain only alphanumeric characters (A-Z, a-z, 0-9), with maximum length 128 // and minimum length one. It can't contain whitespace or metric names reserved for // AWS WAF, including "All" and "Default_Action." You can't change MetricName // after you create the Rule . MetricName *string // The friendly name or description for the Rule . You can't change the name of a // Rule after you create it. Name *string noSmithyDocumentSerde } // This is AWS WAF Classic documentation. For more information, see AWS WAF Classic (https://docs.aws.amazon.com/waf/latest/developerguide/classic-waf-chapter.html) // in the developer guide. For the latest version of AWS WAF, use the AWS WAFV2 API // and see the AWS WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html) // . With the latest version, AWS WAF has a single set of endpoints for regional // and global use. A collection of predefined rules that you can add to a web ACL. // Rule groups are subject to the following limits: // - Three rule groups per account. You can request an increase to this limit by // contacting customer support. // - One rule group per web ACL. // - Ten rules per rule group. type RuleGroup struct { // A unique identifier for a RuleGroup . You use RuleGroupId to get more // information about a RuleGroup (see GetRuleGroup ), update a RuleGroup (see // UpdateRuleGroup ), insert a RuleGroup into a WebACL or delete a one from a // WebACL (see UpdateWebACL ), or delete a RuleGroup from AWS WAF (see // DeleteRuleGroup ). RuleGroupId is returned by CreateRuleGroup and by // ListRuleGroups . // // This member is required. RuleGroupId *string // A friendly name or description for the metrics for this RuleGroup . The name can // contain only alphanumeric characters (A-Z, a-z, 0-9), with maximum length 128 // and minimum length one. It can't contain whitespace or metric names reserved for // AWS WAF, including "All" and "Default_Action." You can't change the name of the // metric after you create the RuleGroup . MetricName *string // The friendly name or description for the RuleGroup . You can't change the name // of a RuleGroup after you create it. Name *string noSmithyDocumentSerde } // This is AWS WAF Classic documentation. For more information, see AWS WAF Classic (https://docs.aws.amazon.com/waf/latest/developerguide/classic-waf-chapter.html) // in the developer guide. For the latest version of AWS WAF, use the AWS WAFV2 API // and see the AWS WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html) // . With the latest version, AWS WAF has a single set of endpoints for regional // and global use. Contains the identifier and the friendly name or description of // the RuleGroup . type RuleGroupSummary struct { // A friendly name or description of the RuleGroup . You can't change the name of a // RuleGroup after you create it. // // This member is required. Name *string // A unique identifier for a RuleGroup . You use RuleGroupId to get more // information about a RuleGroup (see GetRuleGroup ), update a RuleGroup (see // UpdateRuleGroup ), insert a RuleGroup into a WebACL or delete one from a WebACL // (see UpdateWebACL ), or delete a RuleGroup from AWS WAF (see DeleteRuleGroup ). // RuleGroupId is returned by CreateRuleGroup and by ListRuleGroups . // // This member is required. RuleGroupId *string noSmithyDocumentSerde } // This is AWS WAF Classic documentation. For more information, see AWS WAF Classic (https://docs.aws.amazon.com/waf/latest/developerguide/classic-waf-chapter.html) // in the developer guide. For the latest version of AWS WAF, use the AWS WAFV2 API // and see the AWS WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html) // . With the latest version, AWS WAF has a single set of endpoints for regional // and global use. Specifies an ActivatedRule and indicates whether you want to // add it to a RuleGroup or delete it from a RuleGroup . type RuleGroupUpdate struct { // Specify INSERT to add an ActivatedRule to a RuleGroup . Use DELETE to remove an // ActivatedRule from a RuleGroup . // // This member is required. Action ChangeAction // The ActivatedRule object specifies a Rule that you want to insert or delete, // the priority of the Rule in the WebACL , and the action that you want AWS WAF to // take when a web request matches the Rule ( ALLOW , BLOCK , or COUNT ). // // This member is required. ActivatedRule *ActivatedRule noSmithyDocumentSerde } // This is AWS WAF Classic documentation. For more information, see AWS WAF Classic (https://docs.aws.amazon.com/waf/latest/developerguide/classic-waf-chapter.html) // in the developer guide. For the latest version of AWS WAF, use the AWS WAFV2 API // and see the AWS WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html) // . With the latest version, AWS WAF has a single set of endpoints for regional // and global use. Contains the identifier and the friendly name or description of // the Rule . type RuleSummary struct { // A friendly name or description of the Rule . You can't change the name of a Rule // after you create it. // // This member is required. Name *string // A unique identifier for a Rule . You use RuleId to get more information about a // Rule (see GetRule ), update a Rule (see UpdateRule ), insert a Rule into a // WebACL or delete one from a WebACL (see UpdateWebACL ), or delete a Rule from // AWS WAF (see DeleteRule ). RuleId is returned by CreateRule and by ListRules . // // This member is required. RuleId *string noSmithyDocumentSerde } // This is AWS WAF Classic documentation. For more information, see AWS WAF Classic (https://docs.aws.amazon.com/waf/latest/developerguide/classic-waf-chapter.html) // in the developer guide. For the latest version of AWS WAF, use the AWS WAFV2 API // and see the AWS WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html) // . With the latest version, AWS WAF has a single set of endpoints for regional // and global use. Specifies a Predicate (such as an IPSet ) and indicates whether // you want to add it to a Rule or delete it from a Rule . type RuleUpdate struct { // Specify INSERT to add a Predicate to a Rule . Use DELETE to remove a Predicate // from a Rule . // // This member is required. Action ChangeAction // The ID of the Predicate (such as an IPSet ) that you want to add to a Rule . // // This member is required. Predicate *Predicate noSmithyDocumentSerde } // This is AWS WAF Classic documentation. For more information, see AWS WAF Classic (https://docs.aws.amazon.com/waf/latest/developerguide/classic-waf-chapter.html) // in the developer guide. For the latest version of AWS WAF, use the AWS WAFV2 API // and see the AWS WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html) // . With the latest version, AWS WAF has a single set of endpoints for regional // and global use. The response from a GetSampledRequests request includes a // SampledHTTPRequests complex type that appears as SampledRequests in the // response syntax. SampledHTTPRequests contains one SampledHTTPRequest object for // each web request that is returned by GetSampledRequests . type SampledHTTPRequest struct { // A complex type that contains detailed information about the request. // // This member is required. Request *HTTPRequest // A value that indicates how one result in the response relates proportionally to // other results in the response. A result that has a weight of 2 represents // roughly twice as many CloudFront web requests as a result that has a weight of 1 // . // // This member is required. Weight int64 // The action for the Rule that the request matched: ALLOW , BLOCK , or COUNT . Action *string // This value is returned if the GetSampledRequests request specifies the ID of a // RuleGroup rather than the ID of an individual rule. RuleWithinRuleGroup is the // rule within the specified RuleGroup that matched the request listed in the // response. RuleWithinRuleGroup *string // The time at which AWS WAF received the request from your AWS resource, in Unix // time format (in seconds). Timestamp *time.Time noSmithyDocumentSerde } // This is AWS WAF Classic documentation. For more information, see AWS WAF Classic (https://docs.aws.amazon.com/waf/latest/developerguide/classic-waf-chapter.html) // in the developer guide. For the latest version of AWS WAF, use the AWS WAFV2 API // and see the AWS WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html) // . With the latest version, AWS WAF has a single set of endpoints for regional // and global use. Specifies a constraint on the size of a part of the web request. // AWS WAF uses the Size , ComparisonOperator , and FieldToMatch to build an // expression in the form of " Size ComparisonOperator size in bytes of // FieldToMatch ". If that expression is true, the SizeConstraint is considered to // match. type SizeConstraint struct { // The type of comparison you want AWS WAF to perform. AWS WAF uses this in // combination with the provided Size and FieldToMatch to build an expression in // the form of " Size ComparisonOperator size in bytes of FieldToMatch ". If that // expression is true, the SizeConstraint is considered to match. EQ: Used to test // if the Size is equal to the size of the FieldToMatch NE: Used to test if the // Size is not equal to the size of the FieldToMatch LE: Used to test if the Size // is less than or equal to the size of the FieldToMatch LT: Used to test if the // Size is strictly less than the size of the FieldToMatch GE: Used to test if the // Size is greater than or equal to the size of the FieldToMatch GT: Used to test // if the Size is strictly greater than the size of the FieldToMatch // // This member is required. ComparisonOperator ComparisonOperator // Specifies where in a web request to look for the size constraint. // // This member is required. FieldToMatch *FieldToMatch // The size in bytes that you want AWS WAF to compare against the size of the // specified FieldToMatch . AWS WAF uses this in combination with // ComparisonOperator and FieldToMatch to build an expression in the form of " Size // ComparisonOperator size in bytes of FieldToMatch ". If that expression is true, // the SizeConstraint is considered to match. Valid values for size are 0 - // 21474836480 bytes (0 - 20 GB). If you specify URI for the value of Type , the / // in the URI counts as one character. For example, the URI /logo.jpg is nine // characters long. // // This member is required. Size int64 // Text transformations eliminate some of the unusual formatting that attackers // use in web requests in an effort to bypass AWS WAF. If you specify a // transformation, AWS WAF performs the transformation on FieldToMatch before // inspecting it for a match. You can only specify a single type of // TextTransformation. Note that if you choose BODY for the value of Type , you // must choose NONE for TextTransformation because CloudFront forwards only the // first 8192 bytes for inspection. NONE Specify NONE if you don't want to perform // any text transformations. CMD_LINE When you're concerned that attackers are // injecting an operating system command line command and using unusual formatting // to disguise some or all of the command, use this option to perform the following // transformations: // - Delete the following characters: \ " ' ^ // - Delete spaces before the following characters: / ( // - Replace the following characters with a space: , ; // - Replace multiple spaces with one space // - Convert uppercase letters (A-Z) to lowercase (a-z) // COMPRESS_WHITE_SPACE Use this option to replace the following characters with a // space character (decimal 32): // - \f, formfeed, decimal 12 // - \t, tab, decimal 9 // - \n, newline, decimal 10 // - \r, carriage return, decimal 13 // - \v, vertical tab, decimal 11 // - non-breaking space, decimal 160 // COMPRESS_WHITE_SPACE also replaces multiple spaces with one space. // HTML_ENTITY_DECODE Use this option to replace HTML-encoded characters with // unencoded characters. HTML_ENTITY_DECODE performs the following operations: // - Replaces (ampersand)quot; with " // - Replaces (ampersand)nbsp; with a non-breaking space, decimal 160 // - Replaces (ampersand)lt; with a "less than" symbol // - Replaces (ampersand)gt; with > // - Replaces characters that are represented in hexadecimal format, // (ampersand)#xhhhh; , with the corresponding characters // - Replaces characters that are represented in decimal format, // (ampersand)#nnnn; , with the corresponding characters // LOWERCASE Use this option to convert uppercase letters (A-Z) to lowercase // (a-z). URL_DECODE Use this option to decode a URL-encoded value. // // This member is required. TextTransformation TextTransformation noSmithyDocumentSerde } // This is AWS WAF Classic documentation. For more information, see AWS WAF Classic (https://docs.aws.amazon.com/waf/latest/developerguide/classic-waf-chapter.html) // in the developer guide. For the latest version of AWS WAF, use the AWS WAFV2 API // and see the AWS WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html) // . With the latest version, AWS WAF has a single set of endpoints for regional // and global use. A complex type that contains SizeConstraint objects, which // specify the parts of web requests that you want AWS WAF to inspect the size of. // If a SizeConstraintSet contains more than one SizeConstraint object, a request // only needs to match one constraint to be considered a match. type SizeConstraintSet struct { // A unique identifier for a SizeConstraintSet . You use SizeConstraintSetId to // get information about a SizeConstraintSet (see GetSizeConstraintSet ), update a // SizeConstraintSet (see UpdateSizeConstraintSet ), insert a SizeConstraintSet // into a Rule or delete one from a Rule (see UpdateRule ), and delete a // SizeConstraintSet from AWS WAF (see DeleteSizeConstraintSet ). // SizeConstraintSetId is returned by CreateSizeConstraintSet and by // ListSizeConstraintSets . // // This member is required. SizeConstraintSetId *string // Specifies the parts of web requests that you want to inspect the size of. // // This member is required. SizeConstraints []SizeConstraint // The name, if any, of the SizeConstraintSet . Name *string noSmithyDocumentSerde } // This is AWS WAF Classic documentation. For more information, see AWS WAF Classic (https://docs.aws.amazon.com/waf/latest/developerguide/classic-waf-chapter.html) // in the developer guide. For the latest version of AWS WAF, use the AWS WAFV2 API // and see the AWS WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html) // . With the latest version, AWS WAF has a single set of endpoints for regional // and global use. The Id and Name of a SizeConstraintSet . type SizeConstraintSetSummary struct { // The name of the SizeConstraintSet , if any. // // This member is required. Name *string // A unique identifier for a SizeConstraintSet . You use SizeConstraintSetId to // get information about a SizeConstraintSet (see GetSizeConstraintSet ), update a // SizeConstraintSet (see UpdateSizeConstraintSet ), insert a SizeConstraintSet // into a Rule or delete one from a Rule (see UpdateRule ), and delete a // SizeConstraintSet from AWS WAF (see DeleteSizeConstraintSet ). // SizeConstraintSetId is returned by CreateSizeConstraintSet and by // ListSizeConstraintSets . // // This member is required. SizeConstraintSetId *string noSmithyDocumentSerde } // This is AWS WAF Classic documentation. For more information, see AWS WAF Classic (https://docs.aws.amazon.com/waf/latest/developerguide/classic-waf-chapter.html) // in the developer guide. For the latest version of AWS WAF, use the AWS WAFV2 API // and see the AWS WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html) // . With the latest version, AWS WAF has a single set of endpoints for regional // and global use. Specifies the part of a web request that you want to inspect the // size of and indicates whether you want to add the specification to a // SizeConstraintSet or delete it from a SizeConstraintSet . type SizeConstraintSetUpdate struct { // Specify INSERT to add a SizeConstraintSetUpdate to a SizeConstraintSet . Use // DELETE to remove a SizeConstraintSetUpdate from a SizeConstraintSet . // // This member is required. Action ChangeAction // Specifies a constraint on the size of a part of the web request. AWS WAF uses // the Size , ComparisonOperator , and FieldToMatch to build an expression in the // form of " Size ComparisonOperator size in bytes of FieldToMatch ". If that // expression is true, the SizeConstraint is considered to match. // // This member is required. SizeConstraint *SizeConstraint noSmithyDocumentSerde } // This is AWS WAF Classic documentation. For more information, see AWS WAF Classic (https://docs.aws.amazon.com/waf/latest/developerguide/classic-waf-chapter.html) // in the developer guide. For the latest version of AWS WAF, use the AWS WAFV2 API // and see the AWS WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html) // . With the latest version, AWS WAF has a single set of endpoints for regional // and global use. A complex type that contains SqlInjectionMatchTuple objects, // which specify the parts of web requests that you want AWS WAF to inspect for // snippets of malicious SQL code and, if you want AWS WAF to inspect a header, the // name of the header. If a SqlInjectionMatchSet contains more than one // SqlInjectionMatchTuple object, a request needs to include snippets of SQL code // in only one of the specified parts of the request to be considered a match. type SqlInjectionMatchSet struct { // A unique identifier for a SqlInjectionMatchSet . You use SqlInjectionMatchSetId // to get information about a SqlInjectionMatchSet (see GetSqlInjectionMatchSet ), // update a SqlInjectionMatchSet (see UpdateSqlInjectionMatchSet ), insert a // SqlInjectionMatchSet into a Rule or delete one from a Rule (see UpdateRule ), // and delete a SqlInjectionMatchSet from AWS WAF (see DeleteSqlInjectionMatchSet // ). SqlInjectionMatchSetId is returned by CreateSqlInjectionMatchSet and by // ListSqlInjectionMatchSets . // // This member is required. SqlInjectionMatchSetId *string // Specifies the parts of web requests that you want to inspect for snippets of // malicious SQL code. // // This member is required. SqlInjectionMatchTuples []SqlInjectionMatchTuple // The name, if any, of the SqlInjectionMatchSet . Name *string noSmithyDocumentSerde } // This is AWS WAF Classic documentation. For more information, see AWS WAF Classic (https://docs.aws.amazon.com/waf/latest/developerguide/classic-waf-chapter.html) // in the developer guide. For the latest version of AWS WAF, use the AWS WAFV2 API // and see the AWS WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html) // . With the latest version, AWS WAF has a single set of endpoints for regional // and global use. The Id and Name of a SqlInjectionMatchSet . type SqlInjectionMatchSetSummary struct { // The name of the SqlInjectionMatchSet , if any, specified by Id . // // This member is required. Name *string // A unique identifier for a SqlInjectionMatchSet . You use SqlInjectionMatchSetId // to get information about a SqlInjectionMatchSet (see GetSqlInjectionMatchSet ), // update a SqlInjectionMatchSet (see UpdateSqlInjectionMatchSet ), insert a // SqlInjectionMatchSet into a Rule or delete one from a Rule (see UpdateRule ), // and delete a SqlInjectionMatchSet from AWS WAF (see DeleteSqlInjectionMatchSet // ). SqlInjectionMatchSetId is returned by CreateSqlInjectionMatchSet and by // ListSqlInjectionMatchSets . // // This member is required. SqlInjectionMatchSetId *string noSmithyDocumentSerde } // This is AWS WAF Classic documentation. For more information, see AWS WAF Classic (https://docs.aws.amazon.com/waf/latest/developerguide/classic-waf-chapter.html) // in the developer guide. For the latest version of AWS WAF, use the AWS WAFV2 API // and see the AWS WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html) // . With the latest version, AWS WAF has a single set of endpoints for regional // and global use. Specifies the part of a web request that you want to inspect for // snippets of malicious SQL code and indicates whether you want to add the // specification to a SqlInjectionMatchSet or delete it from a SqlInjectionMatchSet // . type SqlInjectionMatchSetUpdate struct { // Specify INSERT to add a SqlInjectionMatchSetUpdate to a SqlInjectionMatchSet . // Use DELETE to remove a SqlInjectionMatchSetUpdate from a SqlInjectionMatchSet . // // This member is required. Action ChangeAction // Specifies the part of a web request that you want AWS WAF to inspect for // snippets of malicious SQL code and, if you want AWS WAF to inspect a header, the // name of the header. // // This member is required. SqlInjectionMatchTuple *SqlInjectionMatchTuple noSmithyDocumentSerde } // This is AWS WAF Classic documentation. For more information, see AWS WAF Classic (https://docs.aws.amazon.com/waf/latest/developerguide/classic-waf-chapter.html) // in the developer guide. For the latest version of AWS WAF, use the AWS WAFV2 API // and see the AWS WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html) // . With the latest version, AWS WAF has a single set of endpoints for regional // and global use. Specifies the part of a web request that you want AWS WAF to // inspect for snippets of malicious SQL code and, if you want AWS WAF to inspect a // header, the name of the header. type SqlInjectionMatchTuple struct { // Specifies where in a web request to look for snippets of malicious SQL code. // // This member is required. FieldToMatch *FieldToMatch // Text transformations eliminate some of the unusual formatting that attackers // use in web requests in an effort to bypass AWS WAF. If you specify a // transformation, AWS WAF performs the transformation on FieldToMatch before // inspecting it for a match. You can only specify a single type of // TextTransformation. CMD_LINE When you're concerned that attackers are injecting // an operating system command line command and using unusual formatting to // disguise some or all of the command, use this option to perform the following // transformations: // - Delete the following characters: \ " ' ^ // - Delete spaces before the following characters: / ( // - Replace the following characters with a space: , ; // - Replace multiple spaces with one space // - Convert uppercase letters (A-Z) to lowercase (a-z) // COMPRESS_WHITE_SPACE Use this option to replace the following characters with a // space character (decimal 32): // - \f, formfeed, decimal 12 // - \t, tab, decimal 9 // - \n, newline, decimal 10 // - \r, carriage return, decimal 13 // - \v, vertical tab, decimal 11 // - non-breaking space, decimal 160 // COMPRESS_WHITE_SPACE also replaces multiple spaces with one space. // HTML_ENTITY_DECODE Use this option to replace HTML-encoded characters with // unencoded characters. HTML_ENTITY_DECODE performs the following operations: // - Replaces (ampersand)quot; with " // - Replaces (ampersand)nbsp; with a non-breaking space, decimal 160 // - Replaces (ampersand)lt; with a "less than" symbol // - Replaces (ampersand)gt; with > // - Replaces characters that are represented in hexadecimal format, // (ampersand)#xhhhh; , with the corresponding characters // - Replaces characters that are represented in decimal format, // (ampersand)#nnnn; , with the corresponding characters // LOWERCASE Use this option to convert uppercase letters (A-Z) to lowercase // (a-z). URL_DECODE Use this option to decode a URL-encoded value. NONE Specify // NONE if you don't want to perform any text transformations. // // This member is required. TextTransformation TextTransformation noSmithyDocumentSerde } // This is AWS WAF Classic documentation. For more information, see AWS WAF Classic (https://docs.aws.amazon.com/waf/latest/developerguide/classic-waf-chapter.html) // in the developer guide. For the latest version of AWS WAF, use the AWS WAFV2 API // and see the AWS WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html) // . With the latest version, AWS WAF has a single set of endpoints for regional // and global use. A summary of the rule groups you are subscribed to. type SubscribedRuleGroupSummary struct { // A friendly name or description for the metrics for this RuleGroup . The name can // contain only alphanumeric characters (A-Z, a-z, 0-9), with maximum length 128 // and minimum length one. It can't contain whitespace or metric names reserved for // AWS WAF, including "All" and "Default_Action." You can't change the name of the // metric after you create the RuleGroup . // // This member is required. MetricName *string // A friendly name or description of the RuleGroup . You can't change the name of a // RuleGroup after you create it. // // This member is required. Name *string // A unique identifier for a RuleGroup . // // This member is required. RuleGroupId *string noSmithyDocumentSerde } // This is AWS WAF Classic documentation. For more information, see AWS WAF Classic (https://docs.aws.amazon.com/waf/latest/developerguide/classic-waf-chapter.html) // in the developer guide. For the latest version of AWS WAF, use the AWS WAFV2 API // and see the AWS WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html) // . With the latest version, AWS WAF has a single set of endpoints for regional // and global use. A tag associated with an AWS resource. Tags are key:value pairs // that you can use to categorize and manage your resources, for purposes like // billing. For example, you might set the tag key to "customer" and the value to // the customer name or ID. You can specify one or more tags to add to each AWS // resource, up to 50 tags for a resource. Tagging is only available through the // API, SDKs, and CLI. You can't manage or view tags through the AWS WAF Classic // console. You can tag the AWS resources that you manage through AWS WAF Classic: // web ACLs, rule groups, and rules. type Tag struct { // // // This member is required. Key *string // // // This member is required. Value *string noSmithyDocumentSerde } // This is AWS WAF Classic documentation. For more information, see AWS WAF Classic (https://docs.aws.amazon.com/waf/latest/developerguide/classic-waf-chapter.html) // in the developer guide. For the latest version of AWS WAF, use the AWS WAFV2 API // and see the AWS WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html) // . With the latest version, AWS WAF has a single set of endpoints for regional // and global use. Information for a tag associated with an AWS resource. Tags are // key:value pairs that you can use to categorize and manage your resources, for // purposes like billing. For example, you might set the tag key to "customer" and // the value to the customer name or ID. You can specify one or more tags to add to // each AWS resource, up to 50 tags for a resource. Tagging is only available // through the API, SDKs, and CLI. You can't manage or view tags through the AWS // WAF Classic console. You can tag the AWS resources that you manage through AWS // WAF Classic: web ACLs, rule groups, and rules. type TagInfoForResource struct { // ResourceARN *string // TagList []Tag noSmithyDocumentSerde } // This is AWS WAF Classic documentation. For more information, see AWS WAF Classic (https://docs.aws.amazon.com/waf/latest/developerguide/classic-waf-chapter.html) // in the developer guide. For the latest version of AWS WAF, use the AWS WAFV2 API // and see the AWS WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html) // . With the latest version, AWS WAF has a single set of endpoints for regional // and global use. In a GetSampledRequests request, the StartTime and EndTime // objects specify the time range for which you want AWS WAF to return a sample of // web requests. You must specify the times in Coordinated Universal Time (UTC) // format. UTC format includes the special designator, Z . For example, // "2016-09-27T14:50Z" . In a GetSampledRequests response, the StartTime and // EndTime objects specify the time range for which AWS WAF actually returned a // sample of web requests. AWS WAF gets the specified number of requests from among // the first 5,000 requests that your AWS resource receives during the specified // time period. If your resource receives more than 5,000 requests during that // period, AWS WAF stops sampling after the 5,000th request. In that case, EndTime // is the time that AWS WAF received the 5,000th request. type TimeWindow struct { // The end of the time range from which you want GetSampledRequests to return a // sample of the requests that your AWS resource received. You must specify the // date and time in Coordinated Universal Time (UTC) format. UTC format includes // the special designator, Z . For example, "2016-09-27T14:50Z" . You can specify // any time range in the previous three hours. // // This member is required. EndTime *time.Time // The beginning of the time range from which you want GetSampledRequests to // return a sample of the requests that your AWS resource received. You must // specify the date and time in Coordinated Universal Time (UTC) format. UTC format // includes the special designator, Z . For example, "2016-09-27T14:50Z" . You can // specify any time range in the previous three hours. // // This member is required. StartTime *time.Time noSmithyDocumentSerde } // This is AWS WAF Classic documentation. For more information, see AWS WAF Classic (https://docs.aws.amazon.com/waf/latest/developerguide/classic-waf-chapter.html) // in the developer guide. For the latest version of AWS WAF, use the AWS WAFV2 API // and see the AWS WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html) // . With the latest version, AWS WAF has a single set of endpoints for regional // and global use. For the action that is associated with a rule in a WebACL , // specifies the action that you want AWS WAF to perform when a web request matches // all of the conditions in a rule. For the default action in a WebACL , specifies // the action that you want AWS WAF to take when a web request doesn't match all of // the conditions in any of the rules in a WebACL . type WafAction struct { // Specifies how you want AWS WAF to respond to requests that match the settings // in a Rule . Valid settings include the following: // - ALLOW : AWS WAF allows requests // - BLOCK : AWS WAF blocks requests // - COUNT : AWS WAF increments a counter of the requests that match all of the // conditions in the rule. AWS WAF then continues to inspect the web request based // on the remaining rules in the web ACL. You can't specify COUNT for the default // action for a WebACL . // // This member is required. Type WafActionType noSmithyDocumentSerde } // This is AWS WAF Classic documentation. For more information, see AWS WAF Classic (https://docs.aws.amazon.com/waf/latest/developerguide/classic-waf-chapter.html) // in the developer guide. For the latest version of AWS WAF, use the AWS WAFV2 API // and see the AWS WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html) // . With the latest version, AWS WAF has a single set of endpoints for regional // and global use. The action to take if any rule within the RuleGroup matches a // request. type WafOverrideAction struct { // COUNT overrides the action specified by the individual rule within a RuleGroup // . If set to NONE , the rule's action will take place. // // This member is required. Type WafOverrideActionType noSmithyDocumentSerde } // This is AWS WAF Classic documentation. For more information, see AWS WAF Classic (https://docs.aws.amazon.com/waf/latest/developerguide/classic-waf-chapter.html) // in the developer guide. For the latest version of AWS WAF, use the AWS WAFV2 API // and see the AWS WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html) // . With the latest version, AWS WAF has a single set of endpoints for regional // and global use. Contains the Rules that identify the requests that you want to // allow, block, or count. In a WebACL , you also specify a default action ( ALLOW // or BLOCK ), and the action for each Rule that you add to a WebACL , for example, // block requests from specified IP addresses or block requests from specified // referrers. You also associate the WebACL with a CloudFront distribution to // identify the requests that you want AWS WAF to filter. If you add more than one // Rule to a WebACL , a request needs to match only one of the specifications to be // allowed, blocked, or counted. For more information, see UpdateWebACL . type WebACL struct { // The action to perform if none of the Rules contained in the WebACL match. The // action is specified by the WafAction object. // // This member is required. DefaultAction *WafAction // An array that contains the action for each Rule in a WebACL , the priority of // the Rule , and the ID of the Rule . // // This member is required. Rules []ActivatedRule // A unique identifier for a WebACL . You use WebACLId to get information about a // WebACL (see GetWebACL ), update a WebACL (see UpdateWebACL ), and delete a // WebACL from AWS WAF (see DeleteWebACL ). WebACLId is returned by CreateWebACL // and by ListWebACLs . // // This member is required. WebACLId *string // A friendly name or description for the metrics for this WebACL . The name can // contain only alphanumeric characters (A-Z, a-z, 0-9), with maximum length 128 // and minimum length one. It can't contain whitespace or metric names reserved for // AWS WAF, including "All" and "Default_Action." You can't change MetricName // after you create the WebACL . MetricName *string // A friendly name or description of the WebACL . You can't change the name of a // WebACL after you create it. Name *string // Tha Amazon Resource Name (ARN) of the web ACL. WebACLArn *string noSmithyDocumentSerde } // This is AWS WAF Classic documentation. For more information, see AWS WAF Classic (https://docs.aws.amazon.com/waf/latest/developerguide/classic-waf-chapter.html) // in the developer guide. For the latest version of AWS WAF, use the AWS WAFV2 API // and see the AWS WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html) // . With the latest version, AWS WAF has a single set of endpoints for regional // and global use. Contains the identifier and the name or description of the // WebACL . type WebACLSummary struct { // A friendly name or description of the WebACL . You can't change the name of a // WebACL after you create it. // // This member is required. Name *string // A unique identifier for a WebACL . You use WebACLId to get information about a // WebACL (see GetWebACL ), update a WebACL (see UpdateWebACL ), and delete a // WebACL from AWS WAF (see DeleteWebACL ). WebACLId is returned by CreateWebACL // and by ListWebACLs . // // This member is required. WebACLId *string noSmithyDocumentSerde } // This is AWS WAF Classic documentation. For more information, see AWS WAF Classic (https://docs.aws.amazon.com/waf/latest/developerguide/classic-waf-chapter.html) // in the developer guide. For the latest version of AWS WAF, use the AWS WAFV2 API // and see the AWS WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html) // . With the latest version, AWS WAF has a single set of endpoints for regional // and global use. Specifies whether to insert a Rule into or delete a Rule from a // WebACL . type WebACLUpdate struct { // Specifies whether to insert a Rule into or delete a Rule from a WebACL . // // This member is required. Action ChangeAction // The ActivatedRule object in an UpdateWebACL request specifies a Rule that you // want to insert or delete, the priority of the Rule in the WebACL , and the // action that you want AWS WAF to take when a web request matches the Rule ( ALLOW // , BLOCK , or COUNT ). // // This member is required. ActivatedRule *ActivatedRule noSmithyDocumentSerde } // This is AWS WAF Classic documentation. For more information, see AWS WAF Classic (https://docs.aws.amazon.com/waf/latest/developerguide/classic-waf-chapter.html) // in the developer guide. For the latest version of AWS WAF, use the AWS WAFV2 API // and see the AWS WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html) // . With the latest version, AWS WAF has a single set of endpoints for regional // and global use. A complex type that contains XssMatchTuple objects, which // specify the parts of web requests that you want AWS WAF to inspect for // cross-site scripting attacks and, if you want AWS WAF to inspect a header, the // name of the header. If a XssMatchSet contains more than one XssMatchTuple // object, a request needs to include cross-site scripting attacks in only one of // the specified parts of the request to be considered a match. type XssMatchSet struct { // A unique identifier for an XssMatchSet . You use XssMatchSetId to get // information about an XssMatchSet (see GetXssMatchSet ), update an XssMatchSet // (see UpdateXssMatchSet ), insert an XssMatchSet into a Rule or delete one from // a Rule (see UpdateRule ), and delete an XssMatchSet from AWS WAF (see // DeleteXssMatchSet ). XssMatchSetId is returned by CreateXssMatchSet and by // ListXssMatchSets . // // This member is required. XssMatchSetId *string // Specifies the parts of web requests that you want to inspect for cross-site // scripting attacks. // // This member is required. XssMatchTuples []XssMatchTuple // The name, if any, of the XssMatchSet . Name *string noSmithyDocumentSerde } // This is AWS WAF Classic documentation. For more information, see AWS WAF Classic (https://docs.aws.amazon.com/waf/latest/developerguide/classic-waf-chapter.html) // in the developer guide. For the latest version of AWS WAF, use the AWS WAFV2 API // and see the AWS WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html) // . With the latest version, AWS WAF has a single set of endpoints for regional // and global use. The Id and Name of an XssMatchSet . type XssMatchSetSummary struct { // The name of the XssMatchSet , if any, specified by Id . // // This member is required. Name *string // A unique identifier for an XssMatchSet . You use XssMatchSetId to get // information about a XssMatchSet (see GetXssMatchSet ), update an XssMatchSet // (see UpdateXssMatchSet ), insert an XssMatchSet into a Rule or delete one from // a Rule (see UpdateRule ), and delete an XssMatchSet from AWS WAF (see // DeleteXssMatchSet ). XssMatchSetId is returned by CreateXssMatchSet and by // ListXssMatchSets . // // This member is required. XssMatchSetId *string noSmithyDocumentSerde } // This is AWS WAF Classic documentation. For more information, see AWS WAF Classic (https://docs.aws.amazon.com/waf/latest/developerguide/classic-waf-chapter.html) // in the developer guide. For the latest version of AWS WAF, use the AWS WAFV2 API // and see the AWS WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html) // . With the latest version, AWS WAF has a single set of endpoints for regional // and global use. Specifies the part of a web request that you want to inspect for // cross-site scripting attacks and indicates whether you want to add the // specification to an XssMatchSet or delete it from an XssMatchSet . type XssMatchSetUpdate struct { // Specify INSERT to add an XssMatchSetUpdate to an XssMatchSet . Use DELETE to // remove an XssMatchSetUpdate from an XssMatchSet . // // This member is required. Action ChangeAction // Specifies the part of a web request that you want AWS WAF to inspect for // cross-site scripting attacks and, if you want AWS WAF to inspect a header, the // name of the header. // // This member is required. XssMatchTuple *XssMatchTuple noSmithyDocumentSerde } // This is AWS WAF Classic documentation. For more information, see AWS WAF Classic (https://docs.aws.amazon.com/waf/latest/developerguide/classic-waf-chapter.html) // in the developer guide. For the latest version of AWS WAF, use the AWS WAFV2 API // and see the AWS WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html) // . With the latest version, AWS WAF has a single set of endpoints for regional // and global use. Specifies the part of a web request that you want AWS WAF to // inspect for cross-site scripting attacks and, if you want AWS WAF to inspect a // header, the name of the header. type XssMatchTuple struct { // Specifies where in a web request to look for cross-site scripting attacks. // // This member is required. FieldToMatch *FieldToMatch // Text transformations eliminate some of the unusual formatting that attackers // use in web requests in an effort to bypass AWS WAF. If you specify a // transformation, AWS WAF performs the transformation on FieldToMatch before // inspecting it for a match. You can only specify a single type of // TextTransformation. CMD_LINE When you're concerned that attackers are injecting // an operating system command line command and using unusual formatting to // disguise some or all of the command, use this option to perform the following // transformations: // - Delete the following characters: \ " ' ^ // - Delete spaces before the following characters: / ( // - Replace the following characters with a space: , ; // - Replace multiple spaces with one space // - Convert uppercase letters (A-Z) to lowercase (a-z) // COMPRESS_WHITE_SPACE Use this option to replace the following characters with a // space character (decimal 32): // - \f, formfeed, decimal 12 // - \t, tab, decimal 9 // - \n, newline, decimal 10 // - \r, carriage return, decimal 13 // - \v, vertical tab, decimal 11 // - non-breaking space, decimal 160 // COMPRESS_WHITE_SPACE also replaces multiple spaces with one space. // HTML_ENTITY_DECODE Use this option to replace HTML-encoded characters with // unencoded characters. HTML_ENTITY_DECODE performs the following operations: // - Replaces (ampersand)quot; with " // - Replaces (ampersand)nbsp; with a non-breaking space, decimal 160 // - Replaces (ampersand)lt; with a "less than" symbol // - Replaces (ampersand)gt; with > // - Replaces characters that are represented in hexadecimal format, // (ampersand)#xhhhh; , with the corresponding characters // - Replaces characters that are represented in decimal format, // (ampersand)#nnnn; , with the corresponding characters // LOWERCASE Use this option to convert uppercase letters (A-Z) to lowercase // (a-z). URL_DECODE Use this option to decode a URL-encoded value. NONE Specify // NONE if you don't want to perform any text transformations. // // This member is required. TextTransformation TextTransformation noSmithyDocumentSerde } type noSmithyDocumentSerde = smithydocument.NoSerde
1,953
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package wafregional import ( "context" "github.com/aws/aws-sdk-go-v2/aws" "github.com/aws/aws-sdk-go-v2/aws/defaults" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/retry" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" awshttp "github.com/aws/aws-sdk-go-v2/aws/transport/http" internalConfig "github.com/aws/aws-sdk-go-v2/internal/configsources" smithy "github.com/aws/smithy-go" smithydocument "github.com/aws/smithy-go/document" "github.com/aws/smithy-go/logging" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" "net" "net/http" "time" ) const ServiceID = "WAF Regional" const ServiceAPIVersion = "2016-11-28" // Client provides the API client to make operations call for AWS WAF Regional. type Client struct { options Options } // New returns an initialized Client based on the functional options. Provide // additional functional options to further configure the behavior of the client, // such as changing the client's endpoint or adding custom middleware behavior. func New(options Options, optFns ...func(*Options)) *Client { options = options.Copy() resolveDefaultLogger(&options) setResolvedDefaultsMode(&options) resolveRetryer(&options) resolveHTTPClient(&options) resolveHTTPSignerV4(&options) resolveDefaultEndpointConfiguration(&options) for _, fn := range optFns { fn(&options) } client := &Client{ options: options, } return client } type Options struct { // Set of options to modify how an operation is invoked. These apply to all // operations invoked for this client. Use functional options on operation call to // modify this list for per operation behavior. APIOptions []func(*middleware.Stack) error // Configures the events that will be sent to the configured logger. ClientLogMode aws.ClientLogMode // The credentials object to use when signing requests. Credentials aws.CredentialsProvider // The configuration DefaultsMode that the SDK should use when constructing the // clients initial default settings. DefaultsMode aws.DefaultsMode // The endpoint options to be used when attempting to resolve an endpoint. EndpointOptions EndpointResolverOptions // The service endpoint resolver. EndpointResolver EndpointResolver // Signature Version 4 (SigV4) Signer HTTPSignerV4 HTTPSignerV4 // The logger writer interface to write logging messages to. Logger logging.Logger // The region to send requests to. (Required) Region string // RetryMaxAttempts specifies the maximum number attempts an API client will call // an operation that fails with a retryable error. A value of 0 is ignored, and // will not be used to configure the API client created default retryer, or modify // per operation call's retry max attempts. When creating a new API Clients this // member will only be used if the Retryer Options member is nil. This value will // be ignored if Retryer is not nil. If specified in an operation call's functional // options with a value that is different than the constructed client's Options, // the Client's Retryer will be wrapped to use the operation's specific // RetryMaxAttempts value. RetryMaxAttempts int // RetryMode specifies the retry mode the API client will be created with, if // Retryer option is not also specified. When creating a new API Clients this // member will only be used if the Retryer Options member is nil. This value will // be ignored if Retryer is not nil. Currently does not support per operation call // overrides, may in the future. RetryMode aws.RetryMode // Retryer guides how HTTP requests should be retried in case of recoverable // failures. When nil the API client will use a default retryer. The kind of // default retry created by the API client can be changed with the RetryMode // option. Retryer aws.Retryer // The RuntimeEnvironment configuration, only populated if the DefaultsMode is set // to DefaultsModeAuto and is initialized using config.LoadDefaultConfig . You // should not populate this structure programmatically, or rely on the values here // within your applications. RuntimeEnvironment aws.RuntimeEnvironment // The initial DefaultsMode used when the client options were constructed. If the // DefaultsMode was set to aws.DefaultsModeAuto this will store what the resolved // value was at that point in time. Currently does not support per operation call // overrides, may in the future. resolvedDefaultsMode aws.DefaultsMode // The HTTP client to invoke API calls with. Defaults to client's default HTTP // implementation if nil. HTTPClient HTTPClient } // WithAPIOptions returns a functional option for setting the Client's APIOptions // option. func WithAPIOptions(optFns ...func(*middleware.Stack) error) func(*Options) { return func(o *Options) { o.APIOptions = append(o.APIOptions, optFns...) } } // WithEndpointResolver returns a functional option for setting the Client's // EndpointResolver option. func WithEndpointResolver(v EndpointResolver) func(*Options) { return func(o *Options) { o.EndpointResolver = v } } type HTTPClient interface { Do(*http.Request) (*http.Response, error) } // Copy creates a clone where the APIOptions list is deep copied. func (o Options) Copy() Options { to := o to.APIOptions = make([]func(*middleware.Stack) error, len(o.APIOptions)) copy(to.APIOptions, o.APIOptions) return to } func (c *Client) invokeOperation(ctx context.Context, opID string, params interface{}, optFns []func(*Options), stackFns ...func(*middleware.Stack, Options) error) (result interface{}, metadata middleware.Metadata, err error) { ctx = middleware.ClearStackValues(ctx) stack := middleware.NewStack(opID, smithyhttp.NewStackRequest) options := c.options.Copy() for _, fn := range optFns { fn(&options) } finalizeRetryMaxAttemptOptions(&options, *c) finalizeClientEndpointResolverOptions(&options) for _, fn := range stackFns { if err := fn(stack, options); err != nil { return nil, metadata, err } } for _, fn := range options.APIOptions { if err := fn(stack); err != nil { return nil, metadata, err } } handler := middleware.DecorateHandler(smithyhttp.NewClientHandler(options.HTTPClient), stack) result, metadata, err = handler.Handle(ctx, params) if err != nil { err = &smithy.OperationError{ ServiceID: ServiceID, OperationName: opID, Err: err, } } return result, metadata, err } type noSmithyDocumentSerde = smithydocument.NoSerde func resolveDefaultLogger(o *Options) { if o.Logger != nil { return } o.Logger = logging.Nop{} } func addSetLoggerMiddleware(stack *middleware.Stack, o Options) error { return middleware.AddSetLoggerMiddleware(stack, o.Logger) } func setResolvedDefaultsMode(o *Options) { if len(o.resolvedDefaultsMode) > 0 { return } var mode aws.DefaultsMode mode.SetFromString(string(o.DefaultsMode)) if mode == aws.DefaultsModeAuto { mode = defaults.ResolveDefaultsModeAuto(o.Region, o.RuntimeEnvironment) } o.resolvedDefaultsMode = mode } // NewFromConfig returns a new client from the provided config. func NewFromConfig(cfg aws.Config, optFns ...func(*Options)) *Client { opts := Options{ Region: cfg.Region, DefaultsMode: cfg.DefaultsMode, RuntimeEnvironment: cfg.RuntimeEnvironment, HTTPClient: cfg.HTTPClient, Credentials: cfg.Credentials, APIOptions: cfg.APIOptions, Logger: cfg.Logger, ClientLogMode: cfg.ClientLogMode, } resolveAWSRetryerProvider(cfg, &opts) resolveAWSRetryMaxAttempts(cfg, &opts) resolveAWSRetryMode(cfg, &opts) resolveAWSEndpointResolver(cfg, &opts) resolveUseDualStackEndpoint(cfg, &opts) resolveUseFIPSEndpoint(cfg, &opts) return New(opts, optFns...) } func resolveHTTPClient(o *Options) { var buildable *awshttp.BuildableClient if o.HTTPClient != nil { var ok bool buildable, ok = o.HTTPClient.(*awshttp.BuildableClient) if !ok { return } } else { buildable = awshttp.NewBuildableClient() } modeConfig, err := defaults.GetModeConfiguration(o.resolvedDefaultsMode) if err == nil { buildable = buildable.WithDialerOptions(func(dialer *net.Dialer) { if dialerTimeout, ok := modeConfig.GetConnectTimeout(); ok { dialer.Timeout = dialerTimeout } }) buildable = buildable.WithTransportOptions(func(transport *http.Transport) { if tlsHandshakeTimeout, ok := modeConfig.GetTLSNegotiationTimeout(); ok { transport.TLSHandshakeTimeout = tlsHandshakeTimeout } }) } o.HTTPClient = buildable } func resolveRetryer(o *Options) { if o.Retryer != nil { return } if len(o.RetryMode) == 0 { modeConfig, err := defaults.GetModeConfiguration(o.resolvedDefaultsMode) if err == nil { o.RetryMode = modeConfig.RetryMode } } if len(o.RetryMode) == 0 { o.RetryMode = aws.RetryModeStandard } var standardOptions []func(*retry.StandardOptions) if v := o.RetryMaxAttempts; v != 0 { standardOptions = append(standardOptions, func(so *retry.StandardOptions) { so.MaxAttempts = v }) } switch o.RetryMode { case aws.RetryModeAdaptive: var adaptiveOptions []func(*retry.AdaptiveModeOptions) if len(standardOptions) != 0 { adaptiveOptions = append(adaptiveOptions, func(ao *retry.AdaptiveModeOptions) { ao.StandardOptions = append(ao.StandardOptions, standardOptions...) }) } o.Retryer = retry.NewAdaptiveMode(adaptiveOptions...) default: o.Retryer = retry.NewStandard(standardOptions...) } } func resolveAWSRetryerProvider(cfg aws.Config, o *Options) { if cfg.Retryer == nil { return } o.Retryer = cfg.Retryer() } func resolveAWSRetryMode(cfg aws.Config, o *Options) { if len(cfg.RetryMode) == 0 { return } o.RetryMode = cfg.RetryMode } func resolveAWSRetryMaxAttempts(cfg aws.Config, o *Options) { if cfg.RetryMaxAttempts == 0 { return } o.RetryMaxAttempts = cfg.RetryMaxAttempts } func finalizeRetryMaxAttemptOptions(o *Options, client Client) { if v := o.RetryMaxAttempts; v == 0 || v == client.options.RetryMaxAttempts { return } o.Retryer = retry.AddWithMaxAttempts(o.Retryer, o.RetryMaxAttempts) } func resolveAWSEndpointResolver(cfg aws.Config, o *Options) { if cfg.EndpointResolver == nil && cfg.EndpointResolverWithOptions == nil { return } o.EndpointResolver = withEndpointResolver(cfg.EndpointResolver, cfg.EndpointResolverWithOptions, NewDefaultEndpointResolver()) } func addClientUserAgent(stack *middleware.Stack) error { return awsmiddleware.AddSDKAgentKeyValue(awsmiddleware.APIMetadata, "wafregional", goModuleVersion)(stack) } func addHTTPSignerV4Middleware(stack *middleware.Stack, o Options) error { mw := v4.NewSignHTTPRequestMiddleware(v4.SignHTTPRequestMiddlewareOptions{ CredentialsProvider: o.Credentials, Signer: o.HTTPSignerV4, LogSigning: o.ClientLogMode.IsSigning(), }) return stack.Finalize.Add(mw, middleware.After) } type HTTPSignerV4 interface { SignHTTP(ctx context.Context, credentials aws.Credentials, r *http.Request, payloadHash string, service string, region string, signingTime time.Time, optFns ...func(*v4.SignerOptions)) error } func resolveHTTPSignerV4(o *Options) { if o.HTTPSignerV4 != nil { return } o.HTTPSignerV4 = newDefaultV4Signer(*o) } func newDefaultV4Signer(o Options) *v4.Signer { return v4.NewSigner(func(so *v4.SignerOptions) { so.Logger = o.Logger so.LogSigning = o.ClientLogMode.IsSigning() }) } func addRetryMiddlewares(stack *middleware.Stack, o Options) error { mo := retry.AddRetryMiddlewaresOptions{ Retryer: o.Retryer, LogRetryAttempts: o.ClientLogMode.IsRetries(), } return retry.AddRetryMiddlewares(stack, mo) } // resolves dual-stack endpoint configuration func resolveUseDualStackEndpoint(cfg aws.Config, o *Options) error { if len(cfg.ConfigSources) == 0 { return nil } value, found, err := internalConfig.ResolveUseDualStackEndpoint(context.Background(), cfg.ConfigSources) if err != nil { return err } if found { o.EndpointOptions.UseDualStackEndpoint = value } return nil } // resolves FIPS endpoint configuration func resolveUseFIPSEndpoint(cfg aws.Config, o *Options) error { if len(cfg.ConfigSources) == 0 { return nil } value, found, err := internalConfig.ResolveUseFIPSEndpoint(context.Background(), cfg.ConfigSources) if err != nil { return err } if found { o.EndpointOptions.UseFIPSEndpoint = value } return nil } func addRequestIDRetrieverMiddleware(stack *middleware.Stack) error { return awsmiddleware.AddRequestIDRetrieverMiddleware(stack) } func addResponseErrorMiddleware(stack *middleware.Stack) error { return awshttp.AddResponseErrorMiddleware(stack) } func addRequestResponseLogging(stack *middleware.Stack, o Options) error { return stack.Deserialize.Add(&smithyhttp.RequestResponseLogger{ LogRequest: o.ClientLogMode.IsRequest(), LogRequestWithBody: o.ClientLogMode.IsRequestWithBody(), LogResponse: o.ClientLogMode.IsResponse(), LogResponseWithBody: o.ClientLogMode.IsResponseWithBody(), }, middleware.After) }
434
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package wafregional import ( "context" "github.com/aws/aws-sdk-go-v2/aws" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" "io/ioutil" "net/http" "strings" "testing" ) func TestClient_resolveRetryOptions(t *testing.T) { nopClient := smithyhttp.ClientDoFunc(func(_ *http.Request) (*http.Response, error) { return &http.Response{ StatusCode: 200, Header: http.Header{}, Body: ioutil.NopCloser(strings.NewReader("")), }, nil }) cases := map[string]struct { defaultsMode aws.DefaultsMode retryer aws.Retryer retryMaxAttempts int opRetryMaxAttempts *int retryMode aws.RetryMode expectClientRetryMode aws.RetryMode expectClientMaxAttempts int expectOpMaxAttempts int }{ "defaults": { defaultsMode: aws.DefaultsModeStandard, expectClientRetryMode: aws.RetryModeStandard, expectClientMaxAttempts: 3, expectOpMaxAttempts: 3, }, "custom default retry": { retryMode: aws.RetryModeAdaptive, retryMaxAttempts: 10, expectClientRetryMode: aws.RetryModeAdaptive, expectClientMaxAttempts: 10, expectOpMaxAttempts: 10, }, "custom op max attempts": { retryMode: aws.RetryModeAdaptive, retryMaxAttempts: 10, opRetryMaxAttempts: aws.Int(2), expectClientRetryMode: aws.RetryModeAdaptive, expectClientMaxAttempts: 10, expectOpMaxAttempts: 2, }, "custom op no change max attempts": { retryMode: aws.RetryModeAdaptive, retryMaxAttempts: 10, opRetryMaxAttempts: aws.Int(10), expectClientRetryMode: aws.RetryModeAdaptive, expectClientMaxAttempts: 10, expectOpMaxAttempts: 10, }, "custom op 0 max attempts": { retryMode: aws.RetryModeAdaptive, retryMaxAttempts: 10, opRetryMaxAttempts: aws.Int(0), expectClientRetryMode: aws.RetryModeAdaptive, expectClientMaxAttempts: 10, expectOpMaxAttempts: 10, }, } for name, c := range cases { t.Run(name, func(t *testing.T) { client := NewFromConfig(aws.Config{ DefaultsMode: c.defaultsMode, Retryer: func() func() aws.Retryer { if c.retryer == nil { return nil } return func() aws.Retryer { return c.retryer } }(), HTTPClient: nopClient, RetryMaxAttempts: c.retryMaxAttempts, RetryMode: c.retryMode, }) if e, a := c.expectClientRetryMode, client.options.RetryMode; e != a { t.Errorf("expect %v retry mode, got %v", e, a) } if e, a := c.expectClientMaxAttempts, client.options.Retryer.MaxAttempts(); e != a { t.Errorf("expect %v max attempts, got %v", e, a) } _, _, err := client.invokeOperation(context.Background(), "mockOperation", struct{}{}, []func(*Options){ func(o *Options) { if c.opRetryMaxAttempts == nil { return } o.RetryMaxAttempts = *c.opRetryMaxAttempts }, }, func(s *middleware.Stack, o Options) error { s.Initialize.Clear() s.Serialize.Clear() s.Build.Clear() s.Finalize.Clear() s.Deserialize.Clear() if e, a := c.expectOpMaxAttempts, o.Retryer.MaxAttempts(); e != a { t.Errorf("expect %v op max attempts, got %v", e, a) } return nil }) if err != nil { t.Fatalf("expect no operation error, got %v", err) } }) } }
124
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package wafregional import ( "context" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // This is AWS WAF Classic Regional documentation. For more information, see AWS // WAF Classic (https://docs.aws.amazon.com/waf/latest/developerguide/classic-waf-chapter.html) // in the developer guide. For the latest version of AWS WAF, use the AWS WAFV2 API // and see the AWS WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html) // . With the latest version, AWS WAF has a single set of endpoints for regional // and global use. Associates a web ACL with a resource, either an application load // balancer or Amazon API Gateway stage. func (c *Client) AssociateWebACL(ctx context.Context, params *AssociateWebACLInput, optFns ...func(*Options)) (*AssociateWebACLOutput, error) { if params == nil { params = &AssociateWebACLInput{} } result, metadata, err := c.invokeOperation(ctx, "AssociateWebACL", params, optFns, c.addOperationAssociateWebACLMiddlewares) if err != nil { return nil, err } out := result.(*AssociateWebACLOutput) out.ResultMetadata = metadata return out, nil } type AssociateWebACLInput struct { // The ARN (Amazon Resource Name) of the resource to be protected, either an // application load balancer or Amazon API Gateway stage. The ARN should be in one // of the following formats: // - For an Application Load Balancer: // arn:aws:elasticloadbalancing:region:account-id:loadbalancer/app/load-balancer-name/load-balancer-id // // - For an Amazon API Gateway stage: // arn:aws:apigateway:region::/restapis/api-id/stages/stage-name // // This member is required. ResourceArn *string // A unique identifier (ID) for the web ACL. // // This member is required. WebACLId *string noSmithyDocumentSerde } type AssociateWebACLOutput struct { // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationAssociateWebACLMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson11_serializeOpAssociateWebACL{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpAssociateWebACL{}, middleware.After) if err != nil { return err } if err = addSetLoggerMiddleware(stack, options); err != nil { return err } if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { return err } if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { return err } if err = addRetryMiddlewares(stack, options); err != nil { return err } if err = addHTTPSignerV4Middleware(stack, options); err != nil { return err } if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { return err } if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack); err != nil { return err } if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { return err } if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } if err = addOpAssociateWebACLValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opAssociateWebACL(options.Region), middleware.Before); err != nil { return err } if err = awsmiddleware.AddRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { return err } if err = addResponseErrorMiddleware(stack); err != nil { return err } if err = addRequestResponseLogging(stack, options); err != nil { return err } return nil } func newServiceMetadataMiddleware_opAssociateWebACL(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "waf-regional", OperationName: "AssociateWebACL", } }
138
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package wafregional import ( "context" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/wafregional/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // This is AWS WAF Classic documentation. For more information, see AWS WAF Classic (https://docs.aws.amazon.com/waf/latest/developerguide/classic-waf-chapter.html) // in the developer guide. For the latest version of AWS WAF, use the AWS WAFV2 API // and see the AWS WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html) // . With the latest version, AWS WAF has a single set of endpoints for regional // and global use. Creates a ByteMatchSet . You then use UpdateByteMatchSet to // identify the part of a web request that you want AWS WAF to inspect, such as the // values of the User-Agent header or the query string. For example, you can // create a ByteMatchSet that matches any requests with User-Agent headers that // contain the string BadBot . You can then configure AWS WAF to reject those // requests. To create and configure a ByteMatchSet , perform the following steps: // - Use GetChangeToken to get the change token that you provide in the // ChangeToken parameter of a CreateByteMatchSet request. // - Submit a CreateByteMatchSet request. // - Use GetChangeToken to get the change token that you provide in the // ChangeToken parameter of an UpdateByteMatchSet request. // - Submit an UpdateByteMatchSet request to specify the part of the request that // you want AWS WAF to inspect (for example, the header or the URI) and the value // that you want AWS WAF to watch for. // // For more information about how to use the AWS WAF API to allow or block HTTP // requests, see the AWS WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/) // . func (c *Client) CreateByteMatchSet(ctx context.Context, params *CreateByteMatchSetInput, optFns ...func(*Options)) (*CreateByteMatchSetOutput, error) { if params == nil { params = &CreateByteMatchSetInput{} } result, metadata, err := c.invokeOperation(ctx, "CreateByteMatchSet", params, optFns, c.addOperationCreateByteMatchSetMiddlewares) if err != nil { return nil, err } out := result.(*CreateByteMatchSetOutput) out.ResultMetadata = metadata return out, nil } type CreateByteMatchSetInput struct { // The value returned by the most recent call to GetChangeToken . // // This member is required. ChangeToken *string // A friendly name or description of the ByteMatchSet . You can't change Name // after you create a ByteMatchSet . // // This member is required. Name *string noSmithyDocumentSerde } type CreateByteMatchSetOutput struct { // A ByteMatchSet that contains no ByteMatchTuple objects. ByteMatchSet *types.ByteMatchSet // The ChangeToken that you used to submit the CreateByteMatchSet request. You can // also use this value to query the status of the request. For more information, // see GetChangeTokenStatus . ChangeToken *string // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationCreateByteMatchSetMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson11_serializeOpCreateByteMatchSet{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpCreateByteMatchSet{}, middleware.After) if err != nil { return err } if err = addSetLoggerMiddleware(stack, options); err != nil { return err } if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { return err } if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { return err } if err = addRetryMiddlewares(stack, options); err != nil { return err } if err = addHTTPSignerV4Middleware(stack, options); err != nil { return err } if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { return err } if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack); err != nil { return err } if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { return err } if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } if err = addOpCreateByteMatchSetValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateByteMatchSet(options.Region), middleware.Before); err != nil { return err } if err = awsmiddleware.AddRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { return err } if err = addResponseErrorMiddleware(stack); err != nil { return err } if err = addRequestResponseLogging(stack, options); err != nil { return err } return nil } func newServiceMetadataMiddleware_opCreateByteMatchSet(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "waf-regional", OperationName: "CreateByteMatchSet", } }
157
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package wafregional import ( "context" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/wafregional/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // This is AWS WAF Classic documentation. For more information, see AWS WAF Classic (https://docs.aws.amazon.com/waf/latest/developerguide/classic-waf-chapter.html) // in the developer guide. For the latest version of AWS WAF, use the AWS WAFV2 API // and see the AWS WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html) // . With the latest version, AWS WAF has a single set of endpoints for regional // and global use. Creates an GeoMatchSet , which you use to specify which web // requests you want to allow or block based on the country that the requests // originate from. For example, if you're receiving a lot of requests from one or // more countries and you want to block the requests, you can create an GeoMatchSet // that contains those countries and then configure AWS WAF to block the requests. // To create and configure a GeoMatchSet , perform the following steps: // - Use GetChangeToken to get the change token that you provide in the // ChangeToken parameter of a CreateGeoMatchSet request. // - Submit a CreateGeoMatchSet request. // - Use GetChangeToken to get the change token that you provide in the // ChangeToken parameter of an UpdateGeoMatchSet request. // - Submit an UpdateGeoMatchSetSet request to specify the countries that you // want AWS WAF to watch for. // // For more information about how to use the AWS WAF API to allow or block HTTP // requests, see the AWS WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/) // . func (c *Client) CreateGeoMatchSet(ctx context.Context, params *CreateGeoMatchSetInput, optFns ...func(*Options)) (*CreateGeoMatchSetOutput, error) { if params == nil { params = &CreateGeoMatchSetInput{} } result, metadata, err := c.invokeOperation(ctx, "CreateGeoMatchSet", params, optFns, c.addOperationCreateGeoMatchSetMiddlewares) if err != nil { return nil, err } out := result.(*CreateGeoMatchSetOutput) out.ResultMetadata = metadata return out, nil } type CreateGeoMatchSetInput struct { // The value returned by the most recent call to GetChangeToken . // // This member is required. ChangeToken *string // A friendly name or description of the GeoMatchSet . You can't change Name after // you create the GeoMatchSet . // // This member is required. Name *string noSmithyDocumentSerde } type CreateGeoMatchSetOutput struct { // The ChangeToken that you used to submit the CreateGeoMatchSet request. You can // also use this value to query the status of the request. For more information, // see GetChangeTokenStatus . ChangeToken *string // The GeoMatchSet returned in the CreateGeoMatchSet response. The GeoMatchSet // contains no GeoMatchConstraints . GeoMatchSet *types.GeoMatchSet // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationCreateGeoMatchSetMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson11_serializeOpCreateGeoMatchSet{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpCreateGeoMatchSet{}, middleware.After) if err != nil { return err } if err = addSetLoggerMiddleware(stack, options); err != nil { return err } if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { return err } if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { return err } if err = addRetryMiddlewares(stack, options); err != nil { return err } if err = addHTTPSignerV4Middleware(stack, options); err != nil { return err } if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { return err } if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack); err != nil { return err } if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { return err } if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } if err = addOpCreateGeoMatchSetValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateGeoMatchSet(options.Region), middleware.Before); err != nil { return err } if err = awsmiddleware.AddRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { return err } if err = addResponseErrorMiddleware(stack); err != nil { return err } if err = addRequestResponseLogging(stack, options); err != nil { return err } return nil } func newServiceMetadataMiddleware_opCreateGeoMatchSet(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "waf-regional", OperationName: "CreateGeoMatchSet", } }
157
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package wafregional import ( "context" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/wafregional/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // This is AWS WAF Classic documentation. For more information, see AWS WAF Classic (https://docs.aws.amazon.com/waf/latest/developerguide/classic-waf-chapter.html) // in the developer guide. For the latest version of AWS WAF, use the AWS WAFV2 API // and see the AWS WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html) // . With the latest version, AWS WAF has a single set of endpoints for regional // and global use. Creates an IPSet , which you use to specify which web requests // that you want to allow or block based on the IP addresses that the requests // originate from. For example, if you're receiving a lot of requests from one or // more individual IP addresses or one or more ranges of IP addresses and you want // to block the requests, you can create an IPSet that contains those IP addresses // and then configure AWS WAF to block the requests. To create and configure an // IPSet , perform the following steps: // - Use GetChangeToken to get the change token that you provide in the // ChangeToken parameter of a CreateIPSet request. // - Submit a CreateIPSet request. // - Use GetChangeToken to get the change token that you provide in the // ChangeToken parameter of an UpdateIPSet request. // - Submit an UpdateIPSet request to specify the IP addresses that you want AWS // WAF to watch for. // // For more information about how to use the AWS WAF API to allow or block HTTP // requests, see the AWS WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/) // . func (c *Client) CreateIPSet(ctx context.Context, params *CreateIPSetInput, optFns ...func(*Options)) (*CreateIPSetOutput, error) { if params == nil { params = &CreateIPSetInput{} } result, metadata, err := c.invokeOperation(ctx, "CreateIPSet", params, optFns, c.addOperationCreateIPSetMiddlewares) if err != nil { return nil, err } out := result.(*CreateIPSetOutput) out.ResultMetadata = metadata return out, nil } type CreateIPSetInput struct { // The value returned by the most recent call to GetChangeToken . // // This member is required. ChangeToken *string // A friendly name or description of the IPSet . You can't change Name after you // create the IPSet . // // This member is required. Name *string noSmithyDocumentSerde } type CreateIPSetOutput struct { // The ChangeToken that you used to submit the CreateIPSet request. You can also // use this value to query the status of the request. For more information, see // GetChangeTokenStatus . ChangeToken *string // The IPSet returned in the CreateIPSet response. IPSet *types.IPSet // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationCreateIPSetMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson11_serializeOpCreateIPSet{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpCreateIPSet{}, middleware.After) if err != nil { return err } if err = addSetLoggerMiddleware(stack, options); err != nil { return err } if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { return err } if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { return err } if err = addRetryMiddlewares(stack, options); err != nil { return err } if err = addHTTPSignerV4Middleware(stack, options); err != nil { return err } if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { return err } if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack); err != nil { return err } if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { return err } if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } if err = addOpCreateIPSetValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateIPSet(options.Region), middleware.Before); err != nil { return err } if err = awsmiddleware.AddRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { return err } if err = addResponseErrorMiddleware(stack); err != nil { return err } if err = addRequestResponseLogging(stack, options); err != nil { return err } return nil } func newServiceMetadataMiddleware_opCreateIPSet(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "waf-regional", OperationName: "CreateIPSet", } }
157
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package wafregional import ( "context" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/wafregional/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // This is AWS WAF Classic documentation. For more information, see AWS WAF Classic (https://docs.aws.amazon.com/waf/latest/developerguide/classic-waf-chapter.html) // in the developer guide. For the latest version of AWS WAF, use the AWS WAFV2 API // and see the AWS WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html) // . With the latest version, AWS WAF has a single set of endpoints for regional // and global use. Creates a RateBasedRule . The RateBasedRule contains a RateLimit // , which specifies the maximum number of requests that AWS WAF allows from a // specified IP address in a five-minute period. The RateBasedRule also contains // the IPSet objects, ByteMatchSet objects, and other predicates that identify the // requests that you want to count or block if these requests exceed the RateLimit // . If you add more than one predicate to a RateBasedRule , a request not only // must exceed the RateLimit , but it also must match all the conditions to be // counted or blocked. For example, suppose you add the following to a // RateBasedRule : // - An IPSet that matches the IP address 192.0.2.44/32 // - A ByteMatchSet that matches BadBot in the User-Agent header // // Further, you specify a RateLimit of 1,000. You then add the RateBasedRule to a // WebACL and specify that you want to block requests that meet the conditions in // the rule. For a request to be blocked, it must come from the IP address // 192.0.2.44 and the User-Agent header in the request must contain the value // BadBot . Further, requests that match these two conditions must be received at a // rate of more than 1,000 requests every five minutes. If both conditions are met // and the rate is exceeded, AWS WAF blocks the requests. If the rate drops below // 1,000 for a five-minute period, AWS WAF no longer blocks the requests. As a // second example, suppose you want to limit requests to a particular page on your // site. To do this, you could add the following to a RateBasedRule : // - A ByteMatchSet with FieldToMatch of URI // - A PositionalConstraint of STARTS_WITH // - A TargetString of login // // Further, you specify a RateLimit of 1,000. By adding this RateBasedRule to a // WebACL , you could limit requests to your login page without affecting the rest // of your site. To create and configure a RateBasedRule , perform the following // steps: // - Create and update the predicates that you want to include in the rule. For // more information, see CreateByteMatchSet , CreateIPSet , and // CreateSqlInjectionMatchSet . // - Use GetChangeToken to get the change token that you provide in the // ChangeToken parameter of a CreateRule request. // - Submit a CreateRateBasedRule request. // - Use GetChangeToken to get the change token that you provide in the // ChangeToken parameter of an UpdateRule request. // - Submit an UpdateRateBasedRule request to specify the predicates that you // want to include in the rule. // - Create and update a WebACL that contains the RateBasedRule . For more // information, see CreateWebACL . // // For more information about how to use the AWS WAF API to allow or block HTTP // requests, see the AWS WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/) // . func (c *Client) CreateRateBasedRule(ctx context.Context, params *CreateRateBasedRuleInput, optFns ...func(*Options)) (*CreateRateBasedRuleOutput, error) { if params == nil { params = &CreateRateBasedRuleInput{} } result, metadata, err := c.invokeOperation(ctx, "CreateRateBasedRule", params, optFns, c.addOperationCreateRateBasedRuleMiddlewares) if err != nil { return nil, err } out := result.(*CreateRateBasedRuleOutput) out.ResultMetadata = metadata return out, nil } type CreateRateBasedRuleInput struct { // The ChangeToken that you used to submit the CreateRateBasedRule request. You // can also use this value to query the status of the request. For more // information, see GetChangeTokenStatus . // // This member is required. ChangeToken *string // A friendly name or description for the metrics for this RateBasedRule . The name // can contain only alphanumeric characters (A-Z, a-z, 0-9), with maximum length // 128 and minimum length one. It can't contain whitespace or metric names reserved // for AWS WAF, including "All" and "Default_Action." You can't change the name of // the metric after you create the RateBasedRule . // // This member is required. MetricName *string // A friendly name or description of the RateBasedRule . You can't change the name // of a RateBasedRule after you create it. // // This member is required. Name *string // The field that AWS WAF uses to determine if requests are likely arriving from a // single source and thus subject to rate monitoring. The only valid value for // RateKey is IP . IP indicates that requests that arrive from the same IP address // are subject to the RateLimit that is specified in the RateBasedRule . // // This member is required. RateKey types.RateKey // The maximum number of requests, which have an identical value in the field that // is specified by RateKey , allowed in a five-minute period. If the number of // requests exceeds the RateLimit and the other predicates specified in the rule // are also met, AWS WAF triggers the action that is specified for this rule. // // This member is required. RateLimit int64 // Tags []types.Tag noSmithyDocumentSerde } type CreateRateBasedRuleOutput struct { // The ChangeToken that you used to submit the CreateRateBasedRule request. You // can also use this value to query the status of the request. For more // information, see GetChangeTokenStatus . ChangeToken *string // The RateBasedRule that is returned in the CreateRateBasedRule response. Rule *types.RateBasedRule // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationCreateRateBasedRuleMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson11_serializeOpCreateRateBasedRule{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpCreateRateBasedRule{}, middleware.After) if err != nil { return err } if err = addSetLoggerMiddleware(stack, options); err != nil { return err } if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { return err } if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { return err } if err = addRetryMiddlewares(stack, options); err != nil { return err } if err = addHTTPSignerV4Middleware(stack, options); err != nil { return err } if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { return err } if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack); err != nil { return err } if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { return err } if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } if err = addOpCreateRateBasedRuleValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateRateBasedRule(options.Region), middleware.Before); err != nil { return err } if err = awsmiddleware.AddRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { return err } if err = addResponseErrorMiddleware(stack); err != nil { return err } if err = addRequestResponseLogging(stack, options); err != nil { return err } return nil } func newServiceMetadataMiddleware_opCreateRateBasedRule(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "waf-regional", OperationName: "CreateRateBasedRule", } }
215
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package wafregional import ( "context" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/wafregional/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // This is AWS WAF Classic documentation. For more information, see AWS WAF Classic (https://docs.aws.amazon.com/waf/latest/developerguide/classic-waf-chapter.html) // in the developer guide. For the latest version of AWS WAF, use the AWS WAFV2 API // and see the AWS WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html) // . With the latest version, AWS WAF has a single set of endpoints for regional // and global use. Creates a RegexMatchSet . You then use UpdateRegexMatchSet to // identify the part of a web request that you want AWS WAF to inspect, such as the // values of the User-Agent header or the query string. For example, you can // create a RegexMatchSet that contains a RegexMatchTuple that looks for any // requests with User-Agent headers that match a RegexPatternSet with pattern // B[a@]dB[o0]t . You can then configure AWS WAF to reject those requests. To // create and configure a RegexMatchSet , perform the following steps: // - Use GetChangeToken to get the change token that you provide in the // ChangeToken parameter of a CreateRegexMatchSet request. // - Submit a CreateRegexMatchSet request. // - Use GetChangeToken to get the change token that you provide in the // ChangeToken parameter of an UpdateRegexMatchSet request. // - Submit an UpdateRegexMatchSet request to specify the part of the request // that you want AWS WAF to inspect (for example, the header or the URI) and the // value, using a RegexPatternSet , that you want AWS WAF to watch for. // // For more information about how to use the AWS WAF API to allow or block HTTP // requests, see the AWS WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/) // . func (c *Client) CreateRegexMatchSet(ctx context.Context, params *CreateRegexMatchSetInput, optFns ...func(*Options)) (*CreateRegexMatchSetOutput, error) { if params == nil { params = &CreateRegexMatchSetInput{} } result, metadata, err := c.invokeOperation(ctx, "CreateRegexMatchSet", params, optFns, c.addOperationCreateRegexMatchSetMiddlewares) if err != nil { return nil, err } out := result.(*CreateRegexMatchSetOutput) out.ResultMetadata = metadata return out, nil } type CreateRegexMatchSetInput struct { // The value returned by the most recent call to GetChangeToken . // // This member is required. ChangeToken *string // A friendly name or description of the RegexMatchSet . You can't change Name // after you create a RegexMatchSet . // // This member is required. Name *string noSmithyDocumentSerde } type CreateRegexMatchSetOutput struct { // The ChangeToken that you used to submit the CreateRegexMatchSet request. You // can also use this value to query the status of the request. For more // information, see GetChangeTokenStatus . ChangeToken *string // A RegexMatchSet that contains no RegexMatchTuple objects. RegexMatchSet *types.RegexMatchSet // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationCreateRegexMatchSetMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson11_serializeOpCreateRegexMatchSet{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpCreateRegexMatchSet{}, middleware.After) if err != nil { return err } if err = addSetLoggerMiddleware(stack, options); err != nil { return err } if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { return err } if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { return err } if err = addRetryMiddlewares(stack, options); err != nil { return err } if err = addHTTPSignerV4Middleware(stack, options); err != nil { return err } if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { return err } if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack); err != nil { return err } if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { return err } if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } if err = addOpCreateRegexMatchSetValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateRegexMatchSet(options.Region), middleware.Before); err != nil { return err } if err = awsmiddleware.AddRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { return err } if err = addResponseErrorMiddleware(stack); err != nil { return err } if err = addRequestResponseLogging(stack, options); err != nil { return err } return nil } func newServiceMetadataMiddleware_opCreateRegexMatchSet(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "waf-regional", OperationName: "CreateRegexMatchSet", } }
158
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package wafregional import ( "context" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/wafregional/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // This is AWS WAF Classic documentation. For more information, see AWS WAF Classic (https://docs.aws.amazon.com/waf/latest/developerguide/classic-waf-chapter.html) // in the developer guide. For the latest version of AWS WAF, use the AWS WAFV2 API // and see the AWS WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html) // . With the latest version, AWS WAF has a single set of endpoints for regional // and global use. Creates a RegexPatternSet . You then use UpdateRegexPatternSet // to specify the regular expression (regex) pattern that you want AWS WAF to // search for, such as B[a@]dB[o0]t . You can then configure AWS WAF to reject // those requests. To create and configure a RegexPatternSet , perform the // following steps: // - Use GetChangeToken to get the change token that you provide in the // ChangeToken parameter of a CreateRegexPatternSet request. // - Submit a CreateRegexPatternSet request. // - Use GetChangeToken to get the change token that you provide in the // ChangeToken parameter of an UpdateRegexPatternSet request. // - Submit an UpdateRegexPatternSet request to specify the string that you want // AWS WAF to watch for. // // For more information about how to use the AWS WAF API to allow or block HTTP // requests, see the AWS WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/) // . func (c *Client) CreateRegexPatternSet(ctx context.Context, params *CreateRegexPatternSetInput, optFns ...func(*Options)) (*CreateRegexPatternSetOutput, error) { if params == nil { params = &CreateRegexPatternSetInput{} } result, metadata, err := c.invokeOperation(ctx, "CreateRegexPatternSet", params, optFns, c.addOperationCreateRegexPatternSetMiddlewares) if err != nil { return nil, err } out := result.(*CreateRegexPatternSetOutput) out.ResultMetadata = metadata return out, nil } type CreateRegexPatternSetInput struct { // The value returned by the most recent call to GetChangeToken . // // This member is required. ChangeToken *string // A friendly name or description of the RegexPatternSet . You can't change Name // after you create a RegexPatternSet . // // This member is required. Name *string noSmithyDocumentSerde } type CreateRegexPatternSetOutput struct { // The ChangeToken that you used to submit the CreateRegexPatternSet request. You // can also use this value to query the status of the request. For more // information, see GetChangeTokenStatus . ChangeToken *string // A RegexPatternSet that contains no objects. RegexPatternSet *types.RegexPatternSet // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationCreateRegexPatternSetMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson11_serializeOpCreateRegexPatternSet{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpCreateRegexPatternSet{}, middleware.After) if err != nil { return err } if err = addSetLoggerMiddleware(stack, options); err != nil { return err } if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { return err } if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { return err } if err = addRetryMiddlewares(stack, options); err != nil { return err } if err = addHTTPSignerV4Middleware(stack, options); err != nil { return err } if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { return err } if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack); err != nil { return err } if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { return err } if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } if err = addOpCreateRegexPatternSetValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateRegexPatternSet(options.Region), middleware.Before); err != nil { return err } if err = awsmiddleware.AddRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { return err } if err = addResponseErrorMiddleware(stack); err != nil { return err } if err = addRequestResponseLogging(stack, options); err != nil { return err } return nil } func newServiceMetadataMiddleware_opCreateRegexPatternSet(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "waf-regional", OperationName: "CreateRegexPatternSet", } }
155
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package wafregional import ( "context" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/wafregional/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // This is AWS WAF Classic documentation. For more information, see AWS WAF Classic (https://docs.aws.amazon.com/waf/latest/developerguide/classic-waf-chapter.html) // in the developer guide. For the latest version of AWS WAF, use the AWS WAFV2 API // and see the AWS WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html) // . With the latest version, AWS WAF has a single set of endpoints for regional // and global use. Creates a Rule , which contains the IPSet objects, ByteMatchSet // objects, and other predicates that identify the requests that you want to block. // If you add more than one predicate to a Rule , a request must match all of the // specifications to be allowed or blocked. For example, suppose that you add the // following to a Rule : // - An IPSet that matches the IP address 192.0.2.44/32 // - A ByteMatchSet that matches BadBot in the User-Agent header // // You then add the Rule to a WebACL and specify that you want to blocks requests // that satisfy the Rule . For a request to be blocked, it must come from the IP // address 192.0.2.44 and the User-Agent header in the request must contain the // value BadBot . To create and configure a Rule , perform the following steps: // - Create and update the predicates that you want to include in the Rule . For // more information, see CreateByteMatchSet , CreateIPSet , and // CreateSqlInjectionMatchSet . // - Use GetChangeToken to get the change token that you provide in the // ChangeToken parameter of a CreateRule request. // - Submit a CreateRule request. // - Use GetChangeToken to get the change token that you provide in the // ChangeToken parameter of an UpdateRule request. // - Submit an UpdateRule request to specify the predicates that you want to // include in the Rule . // - Create and update a WebACL that contains the Rule . For more information, // see CreateWebACL . // // For more information about how to use the AWS WAF API to allow or block HTTP // requests, see the AWS WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/) // . func (c *Client) CreateRule(ctx context.Context, params *CreateRuleInput, optFns ...func(*Options)) (*CreateRuleOutput, error) { if params == nil { params = &CreateRuleInput{} } result, metadata, err := c.invokeOperation(ctx, "CreateRule", params, optFns, c.addOperationCreateRuleMiddlewares) if err != nil { return nil, err } out := result.(*CreateRuleOutput) out.ResultMetadata = metadata return out, nil } type CreateRuleInput struct { // The value returned by the most recent call to GetChangeToken . // // This member is required. ChangeToken *string // A friendly name or description for the metrics for this Rule . The name can // contain only alphanumeric characters (A-Z, a-z, 0-9), with maximum length 128 // and minimum length one. It can't contain whitespace or metric names reserved for // AWS WAF, including "All" and "Default_Action." You can't change the name of the // metric after you create the Rule . // // This member is required. MetricName *string // A friendly name or description of the Rule . You can't change the name of a Rule // after you create it. // // This member is required. Name *string // Tags []types.Tag noSmithyDocumentSerde } type CreateRuleOutput struct { // The ChangeToken that you used to submit the CreateRule request. You can also // use this value to query the status of the request. For more information, see // GetChangeTokenStatus . ChangeToken *string // The Rule returned in the CreateRule response. Rule *types.Rule // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationCreateRuleMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson11_serializeOpCreateRule{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpCreateRule{}, middleware.After) if err != nil { return err } if err = addSetLoggerMiddleware(stack, options); err != nil { return err } if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { return err } if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { return err } if err = addRetryMiddlewares(stack, options); err != nil { return err } if err = addHTTPSignerV4Middleware(stack, options); err != nil { return err } if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { return err } if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack); err != nil { return err } if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { return err } if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } if err = addOpCreateRuleValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateRule(options.Region), middleware.Before); err != nil { return err } if err = awsmiddleware.AddRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { return err } if err = addResponseErrorMiddleware(stack); err != nil { return err } if err = addRequestResponseLogging(stack, options); err != nil { return err } return nil } func newServiceMetadataMiddleware_opCreateRule(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "waf-regional", OperationName: "CreateRule", } }
179
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package wafregional import ( "context" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/wafregional/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // This is AWS WAF Classic documentation. For more information, see AWS WAF Classic (https://docs.aws.amazon.com/waf/latest/developerguide/classic-waf-chapter.html) // in the developer guide. For the latest version of AWS WAF, use the AWS WAFV2 API // and see the AWS WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html) // . With the latest version, AWS WAF has a single set of endpoints for regional // and global use. Creates a RuleGroup . A rule group is a collection of predefined // rules that you add to a web ACL. You use UpdateRuleGroup to add rules to the // rule group. Rule groups are subject to the following limits: // - Three rule groups per account. You can request an increase to this limit by // contacting customer support. // - One rule group per web ACL. // - Ten rules per rule group. // // For more information about how to use the AWS WAF API to allow or block HTTP // requests, see the AWS WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/) // . func (c *Client) CreateRuleGroup(ctx context.Context, params *CreateRuleGroupInput, optFns ...func(*Options)) (*CreateRuleGroupOutput, error) { if params == nil { params = &CreateRuleGroupInput{} } result, metadata, err := c.invokeOperation(ctx, "CreateRuleGroup", params, optFns, c.addOperationCreateRuleGroupMiddlewares) if err != nil { return nil, err } out := result.(*CreateRuleGroupOutput) out.ResultMetadata = metadata return out, nil } type CreateRuleGroupInput struct { // The value returned by the most recent call to GetChangeToken . // // This member is required. ChangeToken *string // A friendly name or description for the metrics for this RuleGroup . The name can // contain only alphanumeric characters (A-Z, a-z, 0-9), with maximum length 128 // and minimum length one. It can't contain whitespace or metric names reserved for // AWS WAF, including "All" and "Default_Action." You can't change the name of the // metric after you create the RuleGroup . // // This member is required. MetricName *string // A friendly name or description of the RuleGroup . You can't change Name after // you create a RuleGroup . // // This member is required. Name *string // Tags []types.Tag noSmithyDocumentSerde } type CreateRuleGroupOutput struct { // The ChangeToken that you used to submit the CreateRuleGroup request. You can // also use this value to query the status of the request. For more information, // see GetChangeTokenStatus . ChangeToken *string // An empty RuleGroup . RuleGroup *types.RuleGroup // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationCreateRuleGroupMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson11_serializeOpCreateRuleGroup{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpCreateRuleGroup{}, middleware.After) if err != nil { return err } if err = addSetLoggerMiddleware(stack, options); err != nil { return err } if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { return err } if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { return err } if err = addRetryMiddlewares(stack, options); err != nil { return err } if err = addHTTPSignerV4Middleware(stack, options); err != nil { return err } if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { return err } if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack); err != nil { return err } if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { return err } if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } if err = addOpCreateRuleGroupValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateRuleGroup(options.Region), middleware.Before); err != nil { return err } if err = awsmiddleware.AddRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { return err } if err = addResponseErrorMiddleware(stack); err != nil { return err } if err = addRequestResponseLogging(stack, options); err != nil { return err } return nil } func newServiceMetadataMiddleware_opCreateRuleGroup(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "waf-regional", OperationName: "CreateRuleGroup", } }
162
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package wafregional import ( "context" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/wafregional/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // This is AWS WAF Classic documentation. For more information, see AWS WAF Classic (https://docs.aws.amazon.com/waf/latest/developerguide/classic-waf-chapter.html) // in the developer guide. For the latest version of AWS WAF, use the AWS WAFV2 API // and see the AWS WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html) // . With the latest version, AWS WAF has a single set of endpoints for regional // and global use. Creates a SizeConstraintSet . You then use // UpdateSizeConstraintSet to identify the part of a web request that you want AWS // WAF to check for length, such as the length of the User-Agent header or the // length of the query string. For example, you can create a SizeConstraintSet // that matches any requests that have a query string that is longer than 100 // bytes. You can then configure AWS WAF to reject those requests. To create and // configure a SizeConstraintSet , perform the following steps: // - Use GetChangeToken to get the change token that you provide in the // ChangeToken parameter of a CreateSizeConstraintSet request. // - Submit a CreateSizeConstraintSet request. // - Use GetChangeToken to get the change token that you provide in the // ChangeToken parameter of an UpdateSizeConstraintSet request. // - Submit an UpdateSizeConstraintSet request to specify the part of the request // that you want AWS WAF to inspect (for example, the header or the URI) and the // value that you want AWS WAF to watch for. // // For more information about how to use the AWS WAF API to allow or block HTTP // requests, see the AWS WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/) // . func (c *Client) CreateSizeConstraintSet(ctx context.Context, params *CreateSizeConstraintSetInput, optFns ...func(*Options)) (*CreateSizeConstraintSetOutput, error) { if params == nil { params = &CreateSizeConstraintSetInput{} } result, metadata, err := c.invokeOperation(ctx, "CreateSizeConstraintSet", params, optFns, c.addOperationCreateSizeConstraintSetMiddlewares) if err != nil { return nil, err } out := result.(*CreateSizeConstraintSetOutput) out.ResultMetadata = metadata return out, nil } type CreateSizeConstraintSetInput struct { // The value returned by the most recent call to GetChangeToken . // // This member is required. ChangeToken *string // A friendly name or description of the SizeConstraintSet . You can't change Name // after you create a SizeConstraintSet . // // This member is required. Name *string noSmithyDocumentSerde } type CreateSizeConstraintSetOutput struct { // The ChangeToken that you used to submit the CreateSizeConstraintSet request. // You can also use this value to query the status of the request. For more // information, see GetChangeTokenStatus . ChangeToken *string // A SizeConstraintSet that contains no SizeConstraint objects. SizeConstraintSet *types.SizeConstraintSet // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationCreateSizeConstraintSetMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson11_serializeOpCreateSizeConstraintSet{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpCreateSizeConstraintSet{}, middleware.After) if err != nil { return err } if err = addSetLoggerMiddleware(stack, options); err != nil { return err } if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { return err } if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { return err } if err = addRetryMiddlewares(stack, options); err != nil { return err } if err = addHTTPSignerV4Middleware(stack, options); err != nil { return err } if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { return err } if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack); err != nil { return err } if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { return err } if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } if err = addOpCreateSizeConstraintSetValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateSizeConstraintSet(options.Region), middleware.Before); err != nil { return err } if err = awsmiddleware.AddRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { return err } if err = addResponseErrorMiddleware(stack); err != nil { return err } if err = addRequestResponseLogging(stack, options); err != nil { return err } return nil } func newServiceMetadataMiddleware_opCreateSizeConstraintSet(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "waf-regional", OperationName: "CreateSizeConstraintSet", } }
158
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package wafregional import ( "context" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/wafregional/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // This is AWS WAF Classic documentation. For more information, see AWS WAF Classic (https://docs.aws.amazon.com/waf/latest/developerguide/classic-waf-chapter.html) // in the developer guide. For the latest version of AWS WAF, use the AWS WAFV2 API // and see the AWS WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html) // . With the latest version, AWS WAF has a single set of endpoints for regional // and global use. Creates a SqlInjectionMatchSet , which you use to allow, block, // or count requests that contain snippets of SQL code in a specified part of web // requests. AWS WAF searches for character sequences that are likely to be // malicious strings. To create and configure a SqlInjectionMatchSet , perform the // following steps: // - Use GetChangeToken to get the change token that you provide in the // ChangeToken parameter of a CreateSqlInjectionMatchSet request. // - Submit a CreateSqlInjectionMatchSet request. // - Use GetChangeToken to get the change token that you provide in the // ChangeToken parameter of an UpdateSqlInjectionMatchSet request. // - Submit an UpdateSqlInjectionMatchSet request to specify the parts of web // requests in which you want to allow, block, or count malicious SQL code. // // For more information about how to use the AWS WAF API to allow or block HTTP // requests, see the AWS WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/) // . func (c *Client) CreateSqlInjectionMatchSet(ctx context.Context, params *CreateSqlInjectionMatchSetInput, optFns ...func(*Options)) (*CreateSqlInjectionMatchSetOutput, error) { if params == nil { params = &CreateSqlInjectionMatchSetInput{} } result, metadata, err := c.invokeOperation(ctx, "CreateSqlInjectionMatchSet", params, optFns, c.addOperationCreateSqlInjectionMatchSetMiddlewares) if err != nil { return nil, err } out := result.(*CreateSqlInjectionMatchSetOutput) out.ResultMetadata = metadata return out, nil } // A request to create a SqlInjectionMatchSet . type CreateSqlInjectionMatchSetInput struct { // The value returned by the most recent call to GetChangeToken . // // This member is required. ChangeToken *string // A friendly name or description for the SqlInjectionMatchSet that you're // creating. You can't change Name after you create the SqlInjectionMatchSet . // // This member is required. Name *string noSmithyDocumentSerde } // The response to a CreateSqlInjectionMatchSet request. type CreateSqlInjectionMatchSetOutput struct { // The ChangeToken that you used to submit the CreateSqlInjectionMatchSet request. // You can also use this value to query the status of the request. For more // information, see GetChangeTokenStatus . ChangeToken *string // A SqlInjectionMatchSet . SqlInjectionMatchSet *types.SqlInjectionMatchSet // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationCreateSqlInjectionMatchSetMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson11_serializeOpCreateSqlInjectionMatchSet{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpCreateSqlInjectionMatchSet{}, middleware.After) if err != nil { return err } if err = addSetLoggerMiddleware(stack, options); err != nil { return err } if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { return err } if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { return err } if err = addRetryMiddlewares(stack, options); err != nil { return err } if err = addHTTPSignerV4Middleware(stack, options); err != nil { return err } if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { return err } if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack); err != nil { return err } if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { return err } if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } if err = addOpCreateSqlInjectionMatchSetValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateSqlInjectionMatchSet(options.Region), middleware.Before); err != nil { return err } if err = awsmiddleware.AddRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { return err } if err = addResponseErrorMiddleware(stack); err != nil { return err } if err = addRequestResponseLogging(stack, options); err != nil { return err } return nil } func newServiceMetadataMiddleware_opCreateSqlInjectionMatchSet(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "waf-regional", OperationName: "CreateSqlInjectionMatchSet", } }
157
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package wafregional import ( "context" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/wafregional/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // This is AWS WAF Classic documentation. For more information, see AWS WAF Classic (https://docs.aws.amazon.com/waf/latest/developerguide/classic-waf-chapter.html) // in the developer guide. For the latest version of AWS WAF, use the AWS WAFV2 API // and see the AWS WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html) // . With the latest version, AWS WAF has a single set of endpoints for regional // and global use. Creates a WebACL , which contains the Rules that identify the // CloudFront web requests that you want to allow, block, or count. AWS WAF // evaluates Rules in order based on the value of Priority for each Rule . You also // specify a default action, either ALLOW or BLOCK . If a web request doesn't match // any of the Rules in a WebACL , AWS WAF responds to the request with the default // action. To create and configure a WebACL , perform the following steps: // - Create and update the ByteMatchSet objects and other predicates that you // want to include in Rules . For more information, see CreateByteMatchSet , // UpdateByteMatchSet , CreateIPSet , UpdateIPSet , CreateSqlInjectionMatchSet , // and UpdateSqlInjectionMatchSet . // - Create and update the Rules that you want to include in the WebACL . For // more information, see CreateRule and UpdateRule . // - Use GetChangeToken to get the change token that you provide in the // ChangeToken parameter of a CreateWebACL request. // - Submit a CreateWebACL request. // - Use GetChangeToken to get the change token that you provide in the // ChangeToken parameter of an UpdateWebACL request. // - Submit an UpdateWebACL request to specify the Rules that you want to include // in the WebACL , to specify the default action, and to associate the WebACL // with a CloudFront distribution. // // For more information about how to use the AWS WAF API, see the AWS WAF // Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/) . func (c *Client) CreateWebACL(ctx context.Context, params *CreateWebACLInput, optFns ...func(*Options)) (*CreateWebACLOutput, error) { if params == nil { params = &CreateWebACLInput{} } result, metadata, err := c.invokeOperation(ctx, "CreateWebACL", params, optFns, c.addOperationCreateWebACLMiddlewares) if err != nil { return nil, err } out := result.(*CreateWebACLOutput) out.ResultMetadata = metadata return out, nil } type CreateWebACLInput struct { // The value returned by the most recent call to GetChangeToken . // // This member is required. ChangeToken *string // The action that you want AWS WAF to take when a request doesn't match the // criteria specified in any of the Rule objects that are associated with the // WebACL . // // This member is required. DefaultAction *types.WafAction // A friendly name or description for the metrics for this WebACL .The name can // contain only alphanumeric characters (A-Z, a-z, 0-9), with maximum length 128 // and minimum length one. It can't contain whitespace or metric names reserved for // AWS WAF, including "All" and "Default_Action." You can't change MetricName // after you create the WebACL . // // This member is required. MetricName *string // A friendly name or description of the WebACL . You can't change Name after you // create the WebACL . // // This member is required. Name *string // Tags []types.Tag noSmithyDocumentSerde } type CreateWebACLOutput struct { // The ChangeToken that you used to submit the CreateWebACL request. You can also // use this value to query the status of the request. For more information, see // GetChangeTokenStatus . ChangeToken *string // The WebACL returned in the CreateWebACL response. WebACL *types.WebACL // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationCreateWebACLMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson11_serializeOpCreateWebACL{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpCreateWebACL{}, middleware.After) if err != nil { return err } if err = addSetLoggerMiddleware(stack, options); err != nil { return err } if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { return err } if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { return err } if err = addRetryMiddlewares(stack, options); err != nil { return err } if err = addHTTPSignerV4Middleware(stack, options); err != nil { return err } if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { return err } if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack); err != nil { return err } if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { return err } if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } if err = addOpCreateWebACLValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateWebACL(options.Region), middleware.Before); err != nil { return err } if err = awsmiddleware.AddRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { return err } if err = addResponseErrorMiddleware(stack); err != nil { return err } if err = addRequestResponseLogging(stack, options); err != nil { return err } return nil } func newServiceMetadataMiddleware_opCreateWebACL(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "waf-regional", OperationName: "CreateWebACL", } }
181
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package wafregional import ( "context" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Creates an AWS CloudFormation WAFV2 template for the specified web ACL in the // specified Amazon S3 bucket. Then, in CloudFormation, you create a stack from the // template, to create the web ACL and its resources in AWS WAFV2. Use this to // migrate your AWS WAF Classic web ACL to the latest version of AWS WAF. This is // part of a larger migration procedure for web ACLs from AWS WAF Classic to the // latest version of AWS WAF. For the full procedure, including caveats and manual // steps to complete the migration and switch over to the new web ACL, see // Migrating your AWS WAF Classic resources to AWS WAF (https://docs.aws.amazon.com/waf/latest/developerguide/waf-migrating-from-classic.html) // in the AWS WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html) // . func (c *Client) CreateWebACLMigrationStack(ctx context.Context, params *CreateWebACLMigrationStackInput, optFns ...func(*Options)) (*CreateWebACLMigrationStackOutput, error) { if params == nil { params = &CreateWebACLMigrationStackInput{} } result, metadata, err := c.invokeOperation(ctx, "CreateWebACLMigrationStack", params, optFns, c.addOperationCreateWebACLMigrationStackMiddlewares) if err != nil { return nil, err } out := result.(*CreateWebACLMigrationStackOutput) out.ResultMetadata = metadata return out, nil } type CreateWebACLMigrationStackInput struct { // Indicates whether to exclude entities that can't be migrated or to stop the // migration. Set this to true to ignore unsupported entities in the web ACL during // the migration. Otherwise, if AWS WAF encounters unsupported entities, it stops // the process and throws an exception. // // This member is required. IgnoreUnsupportedType *bool // The name of the Amazon S3 bucket to store the CloudFormation template in. The // S3 bucket must be configured as follows for the migration: // - The bucket name must start with aws-waf-migration- . For example, // aws-waf-migration-my-web-acl . // - The bucket must be in the Region where you are deploying the template. For // example, for a web ACL in us-west-2, you must use an Amazon S3 bucket in // us-west-2 and you must deploy the template stack to us-west-2. // - The bucket policies must permit the migration process to write data. For // listings of the bucket policies, see the Examples section. // // This member is required. S3BucketName *string // The UUID of the WAF Classic web ACL that you want to migrate to WAF v2. // // This member is required. WebACLId *string noSmithyDocumentSerde } type CreateWebACLMigrationStackOutput struct { // The URL of the template created in Amazon S3. // // This member is required. S3ObjectUrl *string // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationCreateWebACLMigrationStackMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson11_serializeOpCreateWebACLMigrationStack{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpCreateWebACLMigrationStack{}, middleware.After) if err != nil { return err } if err = addSetLoggerMiddleware(stack, options); err != nil { return err } if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { return err } if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { return err } if err = addRetryMiddlewares(stack, options); err != nil { return err } if err = addHTTPSignerV4Middleware(stack, options); err != nil { return err } if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { return err } if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack); err != nil { return err } if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { return err } if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } if err = addOpCreateWebACLMigrationStackValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateWebACLMigrationStack(options.Region), middleware.Before); err != nil { return err } if err = awsmiddleware.AddRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { return err } if err = addResponseErrorMiddleware(stack); err != nil { return err } if err = addRequestResponseLogging(stack, options); err != nil { return err } return nil } func newServiceMetadataMiddleware_opCreateWebACLMigrationStack(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "waf-regional", OperationName: "CreateWebACLMigrationStack", } }
156
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package wafregional import ( "context" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/wafregional/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // This is AWS WAF Classic documentation. For more information, see AWS WAF Classic (https://docs.aws.amazon.com/waf/latest/developerguide/classic-waf-chapter.html) // in the developer guide. For the latest version of AWS WAF, use the AWS WAFV2 API // and see the AWS WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html) // . With the latest version, AWS WAF has a single set of endpoints for regional // and global use. Creates an XssMatchSet , which you use to allow, block, or count // requests that contain cross-site scripting attacks in the specified part of web // requests. AWS WAF searches for character sequences that are likely to be // malicious strings. To create and configure an XssMatchSet , perform the // following steps: // - Use GetChangeToken to get the change token that you provide in the // ChangeToken parameter of a CreateXssMatchSet request. // - Submit a CreateXssMatchSet request. // - Use GetChangeToken to get the change token that you provide in the // ChangeToken parameter of an UpdateXssMatchSet request. // - Submit an UpdateXssMatchSet request to specify the parts of web requests in // which you want to allow, block, or count cross-site scripting attacks. // // For more information about how to use the AWS WAF API to allow or block HTTP // requests, see the AWS WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/) // . func (c *Client) CreateXssMatchSet(ctx context.Context, params *CreateXssMatchSetInput, optFns ...func(*Options)) (*CreateXssMatchSetOutput, error) { if params == nil { params = &CreateXssMatchSetInput{} } result, metadata, err := c.invokeOperation(ctx, "CreateXssMatchSet", params, optFns, c.addOperationCreateXssMatchSetMiddlewares) if err != nil { return nil, err } out := result.(*CreateXssMatchSetOutput) out.ResultMetadata = metadata return out, nil } // A request to create an XssMatchSet . type CreateXssMatchSetInput struct { // The value returned by the most recent call to GetChangeToken . // // This member is required. ChangeToken *string // A friendly name or description for the XssMatchSet that you're creating. You // can't change Name after you create the XssMatchSet . // // This member is required. Name *string noSmithyDocumentSerde } // The response to a CreateXssMatchSet request. type CreateXssMatchSetOutput struct { // The ChangeToken that you used to submit the CreateXssMatchSet request. You can // also use this value to query the status of the request. For more information, // see GetChangeTokenStatus . ChangeToken *string // An XssMatchSet . XssMatchSet *types.XssMatchSet // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationCreateXssMatchSetMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson11_serializeOpCreateXssMatchSet{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpCreateXssMatchSet{}, middleware.After) if err != nil { return err } if err = addSetLoggerMiddleware(stack, options); err != nil { return err } if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { return err } if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { return err } if err = addRetryMiddlewares(stack, options); err != nil { return err } if err = addHTTPSignerV4Middleware(stack, options); err != nil { return err } if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { return err } if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack); err != nil { return err } if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { return err } if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } if err = addOpCreateXssMatchSetValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateXssMatchSet(options.Region), middleware.Before); err != nil { return err } if err = awsmiddleware.AddRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { return err } if err = addResponseErrorMiddleware(stack); err != nil { return err } if err = addRequestResponseLogging(stack, options); err != nil { return err } return nil } func newServiceMetadataMiddleware_opCreateXssMatchSet(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "waf-regional", OperationName: "CreateXssMatchSet", } }
157
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package wafregional import ( "context" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // This is AWS WAF Classic documentation. For more information, see AWS WAF Classic (https://docs.aws.amazon.com/waf/latest/developerguide/classic-waf-chapter.html) // in the developer guide. For the latest version of AWS WAF, use the AWS WAFV2 API // and see the AWS WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html) // . With the latest version, AWS WAF has a single set of endpoints for regional // and global use. Permanently deletes a ByteMatchSet . You can't delete a // ByteMatchSet if it's still used in any Rules or if it still includes any // ByteMatchTuple objects (any filters). If you just want to remove a ByteMatchSet // from a Rule , use UpdateRule . To permanently delete a ByteMatchSet , perform // the following steps: // - Update the ByteMatchSet to remove filters, if any. For more information, see // UpdateByteMatchSet . // - Use GetChangeToken to get the change token that you provide in the // ChangeToken parameter of a DeleteByteMatchSet request. // - Submit a DeleteByteMatchSet request. func (c *Client) DeleteByteMatchSet(ctx context.Context, params *DeleteByteMatchSetInput, optFns ...func(*Options)) (*DeleteByteMatchSetOutput, error) { if params == nil { params = &DeleteByteMatchSetInput{} } result, metadata, err := c.invokeOperation(ctx, "DeleteByteMatchSet", params, optFns, c.addOperationDeleteByteMatchSetMiddlewares) if err != nil { return nil, err } out := result.(*DeleteByteMatchSetOutput) out.ResultMetadata = metadata return out, nil } type DeleteByteMatchSetInput struct { // The ByteMatchSetId of the ByteMatchSet that you want to delete. ByteMatchSetId // is returned by CreateByteMatchSet and by ListByteMatchSets . // // This member is required. ByteMatchSetId *string // The value returned by the most recent call to GetChangeToken . // // This member is required. ChangeToken *string noSmithyDocumentSerde } type DeleteByteMatchSetOutput struct { // The ChangeToken that you used to submit the DeleteByteMatchSet request. You can // also use this value to query the status of the request. For more information, // see GetChangeTokenStatus . ChangeToken *string // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationDeleteByteMatchSetMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson11_serializeOpDeleteByteMatchSet{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpDeleteByteMatchSet{}, middleware.After) if err != nil { return err } if err = addSetLoggerMiddleware(stack, options); err != nil { return err } if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { return err } if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { return err } if err = addRetryMiddlewares(stack, options); err != nil { return err } if err = addHTTPSignerV4Middleware(stack, options); err != nil { return err } if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { return err } if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack); err != nil { return err } if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { return err } if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } if err = addOpDeleteByteMatchSetValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteByteMatchSet(options.Region), middleware.Before); err != nil { return err } if err = awsmiddleware.AddRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { return err } if err = addResponseErrorMiddleware(stack); err != nil { return err } if err = addRequestResponseLogging(stack, options); err != nil { return err } return nil } func newServiceMetadataMiddleware_opDeleteByteMatchSet(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "waf-regional", OperationName: "DeleteByteMatchSet", } }
145
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package wafregional import ( "context" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // This is AWS WAF Classic documentation. For more information, see AWS WAF Classic (https://docs.aws.amazon.com/waf/latest/developerguide/classic-waf-chapter.html) // in the developer guide. For the latest version of AWS WAF, use the AWS WAFV2 API // and see the AWS WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html) // . With the latest version, AWS WAF has a single set of endpoints for regional // and global use. Permanently deletes a GeoMatchSet . You can't delete a // GeoMatchSet if it's still used in any Rules or if it still includes any // countries. If you just want to remove a GeoMatchSet from a Rule , use UpdateRule // . To permanently delete a GeoMatchSet from AWS WAF, perform the following // steps: // - Update the GeoMatchSet to remove any countries. For more information, see // UpdateGeoMatchSet . // - Use GetChangeToken to get the change token that you provide in the // ChangeToken parameter of a DeleteGeoMatchSet request. // - Submit a DeleteGeoMatchSet request. func (c *Client) DeleteGeoMatchSet(ctx context.Context, params *DeleteGeoMatchSetInput, optFns ...func(*Options)) (*DeleteGeoMatchSetOutput, error) { if params == nil { params = &DeleteGeoMatchSetInput{} } result, metadata, err := c.invokeOperation(ctx, "DeleteGeoMatchSet", params, optFns, c.addOperationDeleteGeoMatchSetMiddlewares) if err != nil { return nil, err } out := result.(*DeleteGeoMatchSetOutput) out.ResultMetadata = metadata return out, nil } type DeleteGeoMatchSetInput struct { // The value returned by the most recent call to GetChangeToken . // // This member is required. ChangeToken *string // The GeoMatchSetID of the GeoMatchSet that you want to delete. GeoMatchSetId is // returned by CreateGeoMatchSet and by ListGeoMatchSets . // // This member is required. GeoMatchSetId *string noSmithyDocumentSerde } type DeleteGeoMatchSetOutput struct { // The ChangeToken that you used to submit the DeleteGeoMatchSet request. You can // also use this value to query the status of the request. For more information, // see GetChangeTokenStatus . ChangeToken *string // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationDeleteGeoMatchSetMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson11_serializeOpDeleteGeoMatchSet{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpDeleteGeoMatchSet{}, middleware.After) if err != nil { return err } if err = addSetLoggerMiddleware(stack, options); err != nil { return err } if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { return err } if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { return err } if err = addRetryMiddlewares(stack, options); err != nil { return err } if err = addHTTPSignerV4Middleware(stack, options); err != nil { return err } if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { return err } if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack); err != nil { return err } if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { return err } if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } if err = addOpDeleteGeoMatchSetValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteGeoMatchSet(options.Region), middleware.Before); err != nil { return err } if err = awsmiddleware.AddRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { return err } if err = addResponseErrorMiddleware(stack); err != nil { return err } if err = addRequestResponseLogging(stack, options); err != nil { return err } return nil } func newServiceMetadataMiddleware_opDeleteGeoMatchSet(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "waf-regional", OperationName: "DeleteGeoMatchSet", } }
145
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package wafregional import ( "context" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // This is AWS WAF Classic documentation. For more information, see AWS WAF Classic (https://docs.aws.amazon.com/waf/latest/developerguide/classic-waf-chapter.html) // in the developer guide. For the latest version of AWS WAF, use the AWS WAFV2 API // and see the AWS WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html) // . With the latest version, AWS WAF has a single set of endpoints for regional // and global use. Permanently deletes an IPSet . You can't delete an IPSet if // it's still used in any Rules or if it still includes any IP addresses. If you // just want to remove an IPSet from a Rule , use UpdateRule . To permanently // delete an IPSet from AWS WAF, perform the following steps: // - Update the IPSet to remove IP address ranges, if any. For more information, // see UpdateIPSet . // - Use GetChangeToken to get the change token that you provide in the // ChangeToken parameter of a DeleteIPSet request. // - Submit a DeleteIPSet request. func (c *Client) DeleteIPSet(ctx context.Context, params *DeleteIPSetInput, optFns ...func(*Options)) (*DeleteIPSetOutput, error) { if params == nil { params = &DeleteIPSetInput{} } result, metadata, err := c.invokeOperation(ctx, "DeleteIPSet", params, optFns, c.addOperationDeleteIPSetMiddlewares) if err != nil { return nil, err } out := result.(*DeleteIPSetOutput) out.ResultMetadata = metadata return out, nil } type DeleteIPSetInput struct { // The value returned by the most recent call to GetChangeToken . // // This member is required. ChangeToken *string // The IPSetId of the IPSet that you want to delete. IPSetId is returned by // CreateIPSet and by ListIPSets . // // This member is required. IPSetId *string noSmithyDocumentSerde } type DeleteIPSetOutput struct { // The ChangeToken that you used to submit the DeleteIPSet request. You can also // use this value to query the status of the request. For more information, see // GetChangeTokenStatus . ChangeToken *string // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationDeleteIPSetMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson11_serializeOpDeleteIPSet{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpDeleteIPSet{}, middleware.After) if err != nil { return err } if err = addSetLoggerMiddleware(stack, options); err != nil { return err } if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { return err } if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { return err } if err = addRetryMiddlewares(stack, options); err != nil { return err } if err = addHTTPSignerV4Middleware(stack, options); err != nil { return err } if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { return err } if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack); err != nil { return err } if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { return err } if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } if err = addOpDeleteIPSetValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteIPSet(options.Region), middleware.Before); err != nil { return err } if err = awsmiddleware.AddRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { return err } if err = addResponseErrorMiddleware(stack); err != nil { return err } if err = addRequestResponseLogging(stack, options); err != nil { return err } return nil } func newServiceMetadataMiddleware_opDeleteIPSet(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "waf-regional", OperationName: "DeleteIPSet", } }
144
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package wafregional import ( "context" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // This is AWS WAF Classic documentation. For more information, see AWS WAF Classic (https://docs.aws.amazon.com/waf/latest/developerguide/classic-waf-chapter.html) // in the developer guide. For the latest version of AWS WAF, use the AWS WAFV2 API // and see the AWS WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html) // . With the latest version, AWS WAF has a single set of endpoints for regional // and global use. Permanently deletes the LoggingConfiguration from the specified // web ACL. func (c *Client) DeleteLoggingConfiguration(ctx context.Context, params *DeleteLoggingConfigurationInput, optFns ...func(*Options)) (*DeleteLoggingConfigurationOutput, error) { if params == nil { params = &DeleteLoggingConfigurationInput{} } result, metadata, err := c.invokeOperation(ctx, "DeleteLoggingConfiguration", params, optFns, c.addOperationDeleteLoggingConfigurationMiddlewares) if err != nil { return nil, err } out := result.(*DeleteLoggingConfigurationOutput) out.ResultMetadata = metadata return out, nil } type DeleteLoggingConfigurationInput struct { // The Amazon Resource Name (ARN) of the web ACL from which you want to delete the // LoggingConfiguration . // // This member is required. ResourceArn *string noSmithyDocumentSerde } type DeleteLoggingConfigurationOutput struct { // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationDeleteLoggingConfigurationMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson11_serializeOpDeleteLoggingConfiguration{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpDeleteLoggingConfiguration{}, middleware.After) if err != nil { return err } if err = addSetLoggerMiddleware(stack, options); err != nil { return err } if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { return err } if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { return err } if err = addRetryMiddlewares(stack, options); err != nil { return err } if err = addHTTPSignerV4Middleware(stack, options); err != nil { return err } if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { return err } if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack); err != nil { return err } if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { return err } if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } if err = addOpDeleteLoggingConfigurationValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteLoggingConfiguration(options.Region), middleware.Before); err != nil { return err } if err = awsmiddleware.AddRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { return err } if err = addResponseErrorMiddleware(stack); err != nil { return err } if err = addRequestResponseLogging(stack, options); err != nil { return err } return nil } func newServiceMetadataMiddleware_opDeleteLoggingConfiguration(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "waf-regional", OperationName: "DeleteLoggingConfiguration", } }
126
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package wafregional import ( "context" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // This is AWS WAF Classic documentation. For more information, see AWS WAF Classic (https://docs.aws.amazon.com/waf/latest/developerguide/classic-waf-chapter.html) // in the developer guide. For the latest version of AWS WAF, use the AWS WAFV2 API // and see the AWS WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html) // . With the latest version, AWS WAF has a single set of endpoints for regional // and global use. Permanently deletes an IAM policy from the specified RuleGroup. // The user making the request must be the owner of the RuleGroup. func (c *Client) DeletePermissionPolicy(ctx context.Context, params *DeletePermissionPolicyInput, optFns ...func(*Options)) (*DeletePermissionPolicyOutput, error) { if params == nil { params = &DeletePermissionPolicyInput{} } result, metadata, err := c.invokeOperation(ctx, "DeletePermissionPolicy", params, optFns, c.addOperationDeletePermissionPolicyMiddlewares) if err != nil { return nil, err } out := result.(*DeletePermissionPolicyOutput) out.ResultMetadata = metadata return out, nil } type DeletePermissionPolicyInput struct { // The Amazon Resource Name (ARN) of the RuleGroup from which you want to delete // the policy. The user making the request must be the owner of the RuleGroup. // // This member is required. ResourceArn *string noSmithyDocumentSerde } type DeletePermissionPolicyOutput struct { // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationDeletePermissionPolicyMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson11_serializeOpDeletePermissionPolicy{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpDeletePermissionPolicy{}, middleware.After) if err != nil { return err } if err = addSetLoggerMiddleware(stack, options); err != nil { return err } if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { return err } if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { return err } if err = addRetryMiddlewares(stack, options); err != nil { return err } if err = addHTTPSignerV4Middleware(stack, options); err != nil { return err } if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { return err } if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack); err != nil { return err } if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { return err } if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } if err = addOpDeletePermissionPolicyValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeletePermissionPolicy(options.Region), middleware.Before); err != nil { return err } if err = awsmiddleware.AddRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { return err } if err = addResponseErrorMiddleware(stack); err != nil { return err } if err = addRequestResponseLogging(stack, options); err != nil { return err } return nil } func newServiceMetadataMiddleware_opDeletePermissionPolicy(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "waf-regional", OperationName: "DeletePermissionPolicy", } }
126
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package wafregional import ( "context" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // This is AWS WAF Classic documentation. For more information, see AWS WAF Classic (https://docs.aws.amazon.com/waf/latest/developerguide/classic-waf-chapter.html) // in the developer guide. For the latest version of AWS WAF, use the AWS WAFV2 API // and see the AWS WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html) // . With the latest version, AWS WAF has a single set of endpoints for regional // and global use. Permanently deletes a RateBasedRule . You can't delete a rule if // it's still used in any WebACL objects or if it still includes any predicates, // such as ByteMatchSet objects. If you just want to remove a rule from a WebACL , // use UpdateWebACL . To permanently delete a RateBasedRule from AWS WAF, perform // the following steps: // - Update the RateBasedRule to remove predicates, if any. For more information, // see UpdateRateBasedRule . // - Use GetChangeToken to get the change token that you provide in the // ChangeToken parameter of a DeleteRateBasedRule request. // - Submit a DeleteRateBasedRule request. func (c *Client) DeleteRateBasedRule(ctx context.Context, params *DeleteRateBasedRuleInput, optFns ...func(*Options)) (*DeleteRateBasedRuleOutput, error) { if params == nil { params = &DeleteRateBasedRuleInput{} } result, metadata, err := c.invokeOperation(ctx, "DeleteRateBasedRule", params, optFns, c.addOperationDeleteRateBasedRuleMiddlewares) if err != nil { return nil, err } out := result.(*DeleteRateBasedRuleOutput) out.ResultMetadata = metadata return out, nil } type DeleteRateBasedRuleInput struct { // The value returned by the most recent call to GetChangeToken . // // This member is required. ChangeToken *string // The RuleId of the RateBasedRule that you want to delete. RuleId is returned by // CreateRateBasedRule and by ListRateBasedRules . // // This member is required. RuleId *string noSmithyDocumentSerde } type DeleteRateBasedRuleOutput struct { // The ChangeToken that you used to submit the DeleteRateBasedRule request. You // can also use this value to query the status of the request. For more // information, see GetChangeTokenStatus . ChangeToken *string // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationDeleteRateBasedRuleMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson11_serializeOpDeleteRateBasedRule{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpDeleteRateBasedRule{}, middleware.After) if err != nil { return err } if err = addSetLoggerMiddleware(stack, options); err != nil { return err } if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { return err } if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { return err } if err = addRetryMiddlewares(stack, options); err != nil { return err } if err = addHTTPSignerV4Middleware(stack, options); err != nil { return err } if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { return err } if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack); err != nil { return err } if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { return err } if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } if err = addOpDeleteRateBasedRuleValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteRateBasedRule(options.Region), middleware.Before); err != nil { return err } if err = awsmiddleware.AddRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { return err } if err = addResponseErrorMiddleware(stack); err != nil { return err } if err = addRequestResponseLogging(stack, options); err != nil { return err } return nil } func newServiceMetadataMiddleware_opDeleteRateBasedRule(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "waf-regional", OperationName: "DeleteRateBasedRule", } }
145
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package wafregional import ( "context" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // This is AWS WAF Classic documentation. For more information, see AWS WAF Classic (https://docs.aws.amazon.com/waf/latest/developerguide/classic-waf-chapter.html) // in the developer guide. For the latest version of AWS WAF, use the AWS WAFV2 API // and see the AWS WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html) // . With the latest version, AWS WAF has a single set of endpoints for regional // and global use. Permanently deletes a RegexMatchSet . You can't delete a // RegexMatchSet if it's still used in any Rules or if it still includes any // RegexMatchTuples objects (any filters). If you just want to remove a // RegexMatchSet from a Rule , use UpdateRule . To permanently delete a // RegexMatchSet , perform the following steps: // - Update the RegexMatchSet to remove filters, if any. For more information, // see UpdateRegexMatchSet . // - Use GetChangeToken to get the change token that you provide in the // ChangeToken parameter of a DeleteRegexMatchSet request. // - Submit a DeleteRegexMatchSet request. func (c *Client) DeleteRegexMatchSet(ctx context.Context, params *DeleteRegexMatchSetInput, optFns ...func(*Options)) (*DeleteRegexMatchSetOutput, error) { if params == nil { params = &DeleteRegexMatchSetInput{} } result, metadata, err := c.invokeOperation(ctx, "DeleteRegexMatchSet", params, optFns, c.addOperationDeleteRegexMatchSetMiddlewares) if err != nil { return nil, err } out := result.(*DeleteRegexMatchSetOutput) out.ResultMetadata = metadata return out, nil } type DeleteRegexMatchSetInput struct { // The value returned by the most recent call to GetChangeToken . // // This member is required. ChangeToken *string // The RegexMatchSetId of the RegexMatchSet that you want to delete. // RegexMatchSetId is returned by CreateRegexMatchSet and by ListRegexMatchSets . // // This member is required. RegexMatchSetId *string noSmithyDocumentSerde } type DeleteRegexMatchSetOutput struct { // The ChangeToken that you used to submit the DeleteRegexMatchSet request. You // can also use this value to query the status of the request. For more // information, see GetChangeTokenStatus . ChangeToken *string // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationDeleteRegexMatchSetMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson11_serializeOpDeleteRegexMatchSet{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpDeleteRegexMatchSet{}, middleware.After) if err != nil { return err } if err = addSetLoggerMiddleware(stack, options); err != nil { return err } if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { return err } if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { return err } if err = addRetryMiddlewares(stack, options); err != nil { return err } if err = addHTTPSignerV4Middleware(stack, options); err != nil { return err } if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { return err } if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack); err != nil { return err } if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { return err } if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } if err = addOpDeleteRegexMatchSetValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteRegexMatchSet(options.Region), middleware.Before); err != nil { return err } if err = awsmiddleware.AddRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { return err } if err = addResponseErrorMiddleware(stack); err != nil { return err } if err = addRequestResponseLogging(stack, options); err != nil { return err } return nil } func newServiceMetadataMiddleware_opDeleteRegexMatchSet(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "waf-regional", OperationName: "DeleteRegexMatchSet", } }
145
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package wafregional import ( "context" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // This is AWS WAF Classic documentation. For more information, see AWS WAF Classic (https://docs.aws.amazon.com/waf/latest/developerguide/classic-waf-chapter.html) // in the developer guide. For the latest version of AWS WAF, use the AWS WAFV2 API // and see the AWS WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html) // . With the latest version, AWS WAF has a single set of endpoints for regional // and global use. Permanently deletes a RegexPatternSet . You can't delete a // RegexPatternSet if it's still used in any RegexMatchSet or if the // RegexPatternSet is not empty. func (c *Client) DeleteRegexPatternSet(ctx context.Context, params *DeleteRegexPatternSetInput, optFns ...func(*Options)) (*DeleteRegexPatternSetOutput, error) { if params == nil { params = &DeleteRegexPatternSetInput{} } result, metadata, err := c.invokeOperation(ctx, "DeleteRegexPatternSet", params, optFns, c.addOperationDeleteRegexPatternSetMiddlewares) if err != nil { return nil, err } out := result.(*DeleteRegexPatternSetOutput) out.ResultMetadata = metadata return out, nil } type DeleteRegexPatternSetInput struct { // The value returned by the most recent call to GetChangeToken . // // This member is required. ChangeToken *string // The RegexPatternSetId of the RegexPatternSet that you want to delete. // RegexPatternSetId is returned by CreateRegexPatternSet and by // ListRegexPatternSets . // // This member is required. RegexPatternSetId *string noSmithyDocumentSerde } type DeleteRegexPatternSetOutput struct { // The ChangeToken that you used to submit the DeleteRegexPatternSet request. You // can also use this value to query the status of the request. For more // information, see GetChangeTokenStatus . ChangeToken *string // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationDeleteRegexPatternSetMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson11_serializeOpDeleteRegexPatternSet{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpDeleteRegexPatternSet{}, middleware.After) if err != nil { return err } if err = addSetLoggerMiddleware(stack, options); err != nil { return err } if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { return err } if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { return err } if err = addRetryMiddlewares(stack, options); err != nil { return err } if err = addHTTPSignerV4Middleware(stack, options); err != nil { return err } if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { return err } if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack); err != nil { return err } if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { return err } if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } if err = addOpDeleteRegexPatternSetValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteRegexPatternSet(options.Region), middleware.Before); err != nil { return err } if err = awsmiddleware.AddRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { return err } if err = addResponseErrorMiddleware(stack); err != nil { return err } if err = addRequestResponseLogging(stack, options); err != nil { return err } return nil } func newServiceMetadataMiddleware_opDeleteRegexPatternSet(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "waf-regional", OperationName: "DeleteRegexPatternSet", } }
139
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package wafregional import ( "context" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // This is AWS WAF Classic documentation. For more information, see AWS WAF Classic (https://docs.aws.amazon.com/waf/latest/developerguide/classic-waf-chapter.html) // in the developer guide. For the latest version of AWS WAF, use the AWS WAFV2 API // and see the AWS WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html) // . With the latest version, AWS WAF has a single set of endpoints for regional // and global use. Permanently deletes a Rule . You can't delete a Rule if it's // still used in any WebACL objects or if it still includes any predicates, such // as ByteMatchSet objects. If you just want to remove a Rule from a WebACL , use // UpdateWebACL . To permanently delete a Rule from AWS WAF, perform the following // steps: // - Update the Rule to remove predicates, if any. For more information, see // UpdateRule . // - Use GetChangeToken to get the change token that you provide in the // ChangeToken parameter of a DeleteRule request. // - Submit a DeleteRule request. func (c *Client) DeleteRule(ctx context.Context, params *DeleteRuleInput, optFns ...func(*Options)) (*DeleteRuleOutput, error) { if params == nil { params = &DeleteRuleInput{} } result, metadata, err := c.invokeOperation(ctx, "DeleteRule", params, optFns, c.addOperationDeleteRuleMiddlewares) if err != nil { return nil, err } out := result.(*DeleteRuleOutput) out.ResultMetadata = metadata return out, nil } type DeleteRuleInput struct { // The value returned by the most recent call to GetChangeToken . // // This member is required. ChangeToken *string // The RuleId of the Rule that you want to delete. RuleId is returned by CreateRule // and by ListRules . // // This member is required. RuleId *string noSmithyDocumentSerde } type DeleteRuleOutput struct { // The ChangeToken that you used to submit the DeleteRule request. You can also // use this value to query the status of the request. For more information, see // GetChangeTokenStatus . ChangeToken *string // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationDeleteRuleMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson11_serializeOpDeleteRule{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpDeleteRule{}, middleware.After) if err != nil { return err } if err = addSetLoggerMiddleware(stack, options); err != nil { return err } if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { return err } if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { return err } if err = addRetryMiddlewares(stack, options); err != nil { return err } if err = addHTTPSignerV4Middleware(stack, options); err != nil { return err } if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { return err } if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack); err != nil { return err } if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { return err } if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } if err = addOpDeleteRuleValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteRule(options.Region), middleware.Before); err != nil { return err } if err = awsmiddleware.AddRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { return err } if err = addResponseErrorMiddleware(stack); err != nil { return err } if err = addRequestResponseLogging(stack, options); err != nil { return err } return nil } func newServiceMetadataMiddleware_opDeleteRule(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "waf-regional", OperationName: "DeleteRule", } }
145
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package wafregional import ( "context" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // This is AWS WAF Classic documentation. For more information, see AWS WAF Classic (https://docs.aws.amazon.com/waf/latest/developerguide/classic-waf-chapter.html) // in the developer guide. For the latest version of AWS WAF, use the AWS WAFV2 API // and see the AWS WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html) // . With the latest version, AWS WAF has a single set of endpoints for regional // and global use. Permanently deletes a RuleGroup . You can't delete a RuleGroup // if it's still used in any WebACL objects or if it still includes any rules. If // you just want to remove a RuleGroup from a WebACL , use UpdateWebACL . To // permanently delete a RuleGroup from AWS WAF, perform the following steps: // - Update the RuleGroup to remove rules, if any. For more information, see // UpdateRuleGroup . // - Use GetChangeToken to get the change token that you provide in the // ChangeToken parameter of a DeleteRuleGroup request. // - Submit a DeleteRuleGroup request. func (c *Client) DeleteRuleGroup(ctx context.Context, params *DeleteRuleGroupInput, optFns ...func(*Options)) (*DeleteRuleGroupOutput, error) { if params == nil { params = &DeleteRuleGroupInput{} } result, metadata, err := c.invokeOperation(ctx, "DeleteRuleGroup", params, optFns, c.addOperationDeleteRuleGroupMiddlewares) if err != nil { return nil, err } out := result.(*DeleteRuleGroupOutput) out.ResultMetadata = metadata return out, nil } type DeleteRuleGroupInput struct { // The value returned by the most recent call to GetChangeToken . // // This member is required. ChangeToken *string // The RuleGroupId of the RuleGroup that you want to delete. RuleGroupId is // returned by CreateRuleGroup and by ListRuleGroups . // // This member is required. RuleGroupId *string noSmithyDocumentSerde } type DeleteRuleGroupOutput struct { // The ChangeToken that you used to submit the DeleteRuleGroup request. You can // also use this value to query the status of the request. For more information, // see GetChangeTokenStatus . ChangeToken *string // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationDeleteRuleGroupMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson11_serializeOpDeleteRuleGroup{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpDeleteRuleGroup{}, middleware.After) if err != nil { return err } if err = addSetLoggerMiddleware(stack, options); err != nil { return err } if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { return err } if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { return err } if err = addRetryMiddlewares(stack, options); err != nil { return err } if err = addHTTPSignerV4Middleware(stack, options); err != nil { return err } if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { return err } if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack); err != nil { return err } if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { return err } if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } if err = addOpDeleteRuleGroupValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteRuleGroup(options.Region), middleware.Before); err != nil { return err } if err = awsmiddleware.AddRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { return err } if err = addResponseErrorMiddleware(stack); err != nil { return err } if err = addRequestResponseLogging(stack, options); err != nil { return err } return nil } func newServiceMetadataMiddleware_opDeleteRuleGroup(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "waf-regional", OperationName: "DeleteRuleGroup", } }
144
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package wafregional import ( "context" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // This is AWS WAF Classic documentation. For more information, see AWS WAF Classic (https://docs.aws.amazon.com/waf/latest/developerguide/classic-waf-chapter.html) // in the developer guide. For the latest version of AWS WAF, use the AWS WAFV2 API // and see the AWS WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html) // . With the latest version, AWS WAF has a single set of endpoints for regional // and global use. Permanently deletes a SizeConstraintSet . You can't delete a // SizeConstraintSet if it's still used in any Rules or if it still includes any // SizeConstraint objects (any filters). If you just want to remove a // SizeConstraintSet from a Rule , use UpdateRule . To permanently delete a // SizeConstraintSet , perform the following steps: // - Update the SizeConstraintSet to remove filters, if any. For more // information, see UpdateSizeConstraintSet . // - Use GetChangeToken to get the change token that you provide in the // ChangeToken parameter of a DeleteSizeConstraintSet request. // - Submit a DeleteSizeConstraintSet request. func (c *Client) DeleteSizeConstraintSet(ctx context.Context, params *DeleteSizeConstraintSetInput, optFns ...func(*Options)) (*DeleteSizeConstraintSetOutput, error) { if params == nil { params = &DeleteSizeConstraintSetInput{} } result, metadata, err := c.invokeOperation(ctx, "DeleteSizeConstraintSet", params, optFns, c.addOperationDeleteSizeConstraintSetMiddlewares) if err != nil { return nil, err } out := result.(*DeleteSizeConstraintSetOutput) out.ResultMetadata = metadata return out, nil } type DeleteSizeConstraintSetInput struct { // The value returned by the most recent call to GetChangeToken . // // This member is required. ChangeToken *string // The SizeConstraintSetId of the SizeConstraintSet that you want to delete. // SizeConstraintSetId is returned by CreateSizeConstraintSet and by // ListSizeConstraintSets . // // This member is required. SizeConstraintSetId *string noSmithyDocumentSerde } type DeleteSizeConstraintSetOutput struct { // The ChangeToken that you used to submit the DeleteSizeConstraintSet request. // You can also use this value to query the status of the request. For more // information, see GetChangeTokenStatus . ChangeToken *string // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationDeleteSizeConstraintSetMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson11_serializeOpDeleteSizeConstraintSet{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpDeleteSizeConstraintSet{}, middleware.After) if err != nil { return err } if err = addSetLoggerMiddleware(stack, options); err != nil { return err } if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { return err } if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { return err } if err = addRetryMiddlewares(stack, options); err != nil { return err } if err = addHTTPSignerV4Middleware(stack, options); err != nil { return err } if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { return err } if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack); err != nil { return err } if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { return err } if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } if err = addOpDeleteSizeConstraintSetValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteSizeConstraintSet(options.Region), middleware.Before); err != nil { return err } if err = awsmiddleware.AddRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { return err } if err = addResponseErrorMiddleware(stack); err != nil { return err } if err = addRequestResponseLogging(stack, options); err != nil { return err } return nil } func newServiceMetadataMiddleware_opDeleteSizeConstraintSet(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "waf-regional", OperationName: "DeleteSizeConstraintSet", } }
146
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package wafregional import ( "context" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // This is AWS WAF Classic documentation. For more information, see AWS WAF Classic (https://docs.aws.amazon.com/waf/latest/developerguide/classic-waf-chapter.html) // in the developer guide. For the latest version of AWS WAF, use the AWS WAFV2 API // and see the AWS WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html) // . With the latest version, AWS WAF has a single set of endpoints for regional // and global use. Permanently deletes a SqlInjectionMatchSet . You can't delete a // SqlInjectionMatchSet if it's still used in any Rules or if it still contains // any SqlInjectionMatchTuple objects. If you just want to remove a // SqlInjectionMatchSet from a Rule , use UpdateRule . To permanently delete a // SqlInjectionMatchSet from AWS WAF, perform the following steps: // - Update the SqlInjectionMatchSet to remove filters, if any. For more // information, see UpdateSqlInjectionMatchSet . // - Use GetChangeToken to get the change token that you provide in the // ChangeToken parameter of a DeleteSqlInjectionMatchSet request. // - Submit a DeleteSqlInjectionMatchSet request. func (c *Client) DeleteSqlInjectionMatchSet(ctx context.Context, params *DeleteSqlInjectionMatchSetInput, optFns ...func(*Options)) (*DeleteSqlInjectionMatchSetOutput, error) { if params == nil { params = &DeleteSqlInjectionMatchSetInput{} } result, metadata, err := c.invokeOperation(ctx, "DeleteSqlInjectionMatchSet", params, optFns, c.addOperationDeleteSqlInjectionMatchSetMiddlewares) if err != nil { return nil, err } out := result.(*DeleteSqlInjectionMatchSetOutput) out.ResultMetadata = metadata return out, nil } // A request to delete a SqlInjectionMatchSet from AWS WAF. type DeleteSqlInjectionMatchSetInput struct { // The value returned by the most recent call to GetChangeToken . // // This member is required. ChangeToken *string // The SqlInjectionMatchSetId of the SqlInjectionMatchSet that you want to delete. // SqlInjectionMatchSetId is returned by CreateSqlInjectionMatchSet and by // ListSqlInjectionMatchSets . // // This member is required. SqlInjectionMatchSetId *string noSmithyDocumentSerde } // The response to a request to delete a SqlInjectionMatchSet from AWS WAF. type DeleteSqlInjectionMatchSetOutput struct { // The ChangeToken that you used to submit the DeleteSqlInjectionMatchSet request. // You can also use this value to query the status of the request. For more // information, see GetChangeTokenStatus . ChangeToken *string // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationDeleteSqlInjectionMatchSetMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson11_serializeOpDeleteSqlInjectionMatchSet{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpDeleteSqlInjectionMatchSet{}, middleware.After) if err != nil { return err } if err = addSetLoggerMiddleware(stack, options); err != nil { return err } if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { return err } if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { return err } if err = addRetryMiddlewares(stack, options); err != nil { return err } if err = addHTTPSignerV4Middleware(stack, options); err != nil { return err } if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { return err } if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack); err != nil { return err } if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { return err } if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } if err = addOpDeleteSqlInjectionMatchSetValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteSqlInjectionMatchSet(options.Region), middleware.Before); err != nil { return err } if err = awsmiddleware.AddRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { return err } if err = addResponseErrorMiddleware(stack); err != nil { return err } if err = addRequestResponseLogging(stack, options); err != nil { return err } return nil } func newServiceMetadataMiddleware_opDeleteSqlInjectionMatchSet(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "waf-regional", OperationName: "DeleteSqlInjectionMatchSet", } }
148
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package wafregional import ( "context" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // This is AWS WAF Classic documentation. For more information, see AWS WAF Classic (https://docs.aws.amazon.com/waf/latest/developerguide/classic-waf-chapter.html) // in the developer guide. For the latest version of AWS WAF, use the AWS WAFV2 API // and see the AWS WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html) // . With the latest version, AWS WAF has a single set of endpoints for regional // and global use. Permanently deletes a WebACL . You can't delete a WebACL if it // still contains any Rules . To delete a WebACL , perform the following steps: // - Update the WebACL to remove Rules , if any. For more information, see // UpdateWebACL . // - Use GetChangeToken to get the change token that you provide in the // ChangeToken parameter of a DeleteWebACL request. // - Submit a DeleteWebACL request. func (c *Client) DeleteWebACL(ctx context.Context, params *DeleteWebACLInput, optFns ...func(*Options)) (*DeleteWebACLOutput, error) { if params == nil { params = &DeleteWebACLInput{} } result, metadata, err := c.invokeOperation(ctx, "DeleteWebACL", params, optFns, c.addOperationDeleteWebACLMiddlewares) if err != nil { return nil, err } out := result.(*DeleteWebACLOutput) out.ResultMetadata = metadata return out, nil } type DeleteWebACLInput struct { // The value returned by the most recent call to GetChangeToken . // // This member is required. ChangeToken *string // The WebACLId of the WebACL that you want to delete. WebACLId is returned by // CreateWebACL and by ListWebACLs . // // This member is required. WebACLId *string noSmithyDocumentSerde } type DeleteWebACLOutput struct { // The ChangeToken that you used to submit the DeleteWebACL request. You can also // use this value to query the status of the request. For more information, see // GetChangeTokenStatus . ChangeToken *string // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationDeleteWebACLMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson11_serializeOpDeleteWebACL{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpDeleteWebACL{}, middleware.After) if err != nil { return err } if err = addSetLoggerMiddleware(stack, options); err != nil { return err } if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { return err } if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { return err } if err = addRetryMiddlewares(stack, options); err != nil { return err } if err = addHTTPSignerV4Middleware(stack, options); err != nil { return err } if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { return err } if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack); err != nil { return err } if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { return err } if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } if err = addOpDeleteWebACLValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteWebACL(options.Region), middleware.Before); err != nil { return err } if err = awsmiddleware.AddRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { return err } if err = addResponseErrorMiddleware(stack); err != nil { return err } if err = addRequestResponseLogging(stack, options); err != nil { return err } return nil } func newServiceMetadataMiddleware_opDeleteWebACL(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "waf-regional", OperationName: "DeleteWebACL", } }
142
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package wafregional import ( "context" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // This is AWS WAF Classic documentation. For more information, see AWS WAF Classic (https://docs.aws.amazon.com/waf/latest/developerguide/classic-waf-chapter.html) // in the developer guide. For the latest version of AWS WAF, use the AWS WAFV2 API // and see the AWS WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html) // . With the latest version, AWS WAF has a single set of endpoints for regional // and global use. Permanently deletes an XssMatchSet . You can't delete an // XssMatchSet if it's still used in any Rules or if it still contains any // XssMatchTuple objects. If you just want to remove an XssMatchSet from a Rule , // use UpdateRule . To permanently delete an XssMatchSet from AWS WAF, perform the // following steps: // - Update the XssMatchSet to remove filters, if any. For more information, see // UpdateXssMatchSet . // - Use GetChangeToken to get the change token that you provide in the // ChangeToken parameter of a DeleteXssMatchSet request. // - Submit a DeleteXssMatchSet request. func (c *Client) DeleteXssMatchSet(ctx context.Context, params *DeleteXssMatchSetInput, optFns ...func(*Options)) (*DeleteXssMatchSetOutput, error) { if params == nil { params = &DeleteXssMatchSetInput{} } result, metadata, err := c.invokeOperation(ctx, "DeleteXssMatchSet", params, optFns, c.addOperationDeleteXssMatchSetMiddlewares) if err != nil { return nil, err } out := result.(*DeleteXssMatchSetOutput) out.ResultMetadata = metadata return out, nil } // A request to delete an XssMatchSet from AWS WAF. type DeleteXssMatchSetInput struct { // The value returned by the most recent call to GetChangeToken . // // This member is required. ChangeToken *string // The XssMatchSetId of the XssMatchSet that you want to delete. XssMatchSetId is // returned by CreateXssMatchSet and by ListXssMatchSets . // // This member is required. XssMatchSetId *string noSmithyDocumentSerde } // The response to a request to delete an XssMatchSet from AWS WAF. type DeleteXssMatchSetOutput struct { // The ChangeToken that you used to submit the DeleteXssMatchSet request. You can // also use this value to query the status of the request. For more information, // see GetChangeTokenStatus . ChangeToken *string // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationDeleteXssMatchSetMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson11_serializeOpDeleteXssMatchSet{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpDeleteXssMatchSet{}, middleware.After) if err != nil { return err } if err = addSetLoggerMiddleware(stack, options); err != nil { return err } if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { return err } if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { return err } if err = addRetryMiddlewares(stack, options); err != nil { return err } if err = addHTTPSignerV4Middleware(stack, options); err != nil { return err } if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { return err } if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack); err != nil { return err } if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { return err } if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } if err = addOpDeleteXssMatchSetValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteXssMatchSet(options.Region), middleware.Before); err != nil { return err } if err = awsmiddleware.AddRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { return err } if err = addResponseErrorMiddleware(stack); err != nil { return err } if err = addRequestResponseLogging(stack, options); err != nil { return err } return nil } func newServiceMetadataMiddleware_opDeleteXssMatchSet(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "waf-regional", OperationName: "DeleteXssMatchSet", } }
147
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package wafregional import ( "context" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // This is AWS WAF Classic Regional documentation. For more information, see AWS // WAF Classic (https://docs.aws.amazon.com/waf/latest/developerguide/classic-waf-chapter.html) // in the developer guide. For the latest version of AWS WAF, use the AWS WAFV2 API // and see the AWS WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html) // . With the latest version, AWS WAF has a single set of endpoints for regional // and global use. Removes a web ACL from the specified resource, either an // application load balancer or Amazon API Gateway stage. func (c *Client) DisassociateWebACL(ctx context.Context, params *DisassociateWebACLInput, optFns ...func(*Options)) (*DisassociateWebACLOutput, error) { if params == nil { params = &DisassociateWebACLInput{} } result, metadata, err := c.invokeOperation(ctx, "DisassociateWebACL", params, optFns, c.addOperationDisassociateWebACLMiddlewares) if err != nil { return nil, err } out := result.(*DisassociateWebACLOutput) out.ResultMetadata = metadata return out, nil } type DisassociateWebACLInput struct { // The ARN (Amazon Resource Name) of the resource from which the web ACL is being // removed, either an application load balancer or Amazon API Gateway stage. The // ARN should be in one of the following formats: // - For an Application Load Balancer: // arn:aws:elasticloadbalancing:region:account-id:loadbalancer/app/load-balancer-name/load-balancer-id // // - For an Amazon API Gateway stage: // arn:aws:apigateway:region::/restapis/api-id/stages/stage-name // // This member is required. ResourceArn *string noSmithyDocumentSerde } type DisassociateWebACLOutput struct { // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationDisassociateWebACLMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson11_serializeOpDisassociateWebACL{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpDisassociateWebACL{}, middleware.After) if err != nil { return err } if err = addSetLoggerMiddleware(stack, options); err != nil { return err } if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { return err } if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { return err } if err = addRetryMiddlewares(stack, options); err != nil { return err } if err = addHTTPSignerV4Middleware(stack, options); err != nil { return err } if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { return err } if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack); err != nil { return err } if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { return err } if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } if err = addOpDisassociateWebACLValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDisassociateWebACL(options.Region), middleware.Before); err != nil { return err } if err = awsmiddleware.AddRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { return err } if err = addResponseErrorMiddleware(stack); err != nil { return err } if err = addRequestResponseLogging(stack, options); err != nil { return err } return nil } func newServiceMetadataMiddleware_opDisassociateWebACL(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "waf-regional", OperationName: "DisassociateWebACL", } }
133
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package wafregional import ( "context" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/wafregional/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // This is AWS WAF Classic documentation. For more information, see AWS WAF Classic (https://docs.aws.amazon.com/waf/latest/developerguide/classic-waf-chapter.html) // in the developer guide. For the latest version of AWS WAF, use the AWS WAFV2 API // and see the AWS WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html) // . With the latest version, AWS WAF has a single set of endpoints for regional // and global use. Returns the ByteMatchSet specified by ByteMatchSetId . func (c *Client) GetByteMatchSet(ctx context.Context, params *GetByteMatchSetInput, optFns ...func(*Options)) (*GetByteMatchSetOutput, error) { if params == nil { params = &GetByteMatchSetInput{} } result, metadata, err := c.invokeOperation(ctx, "GetByteMatchSet", params, optFns, c.addOperationGetByteMatchSetMiddlewares) if err != nil { return nil, err } out := result.(*GetByteMatchSetOutput) out.ResultMetadata = metadata return out, nil } type GetByteMatchSetInput struct { // The ByteMatchSetId of the ByteMatchSet that you want to get. ByteMatchSetId is // returned by CreateByteMatchSet and by ListByteMatchSets . // // This member is required. ByteMatchSetId *string noSmithyDocumentSerde } type GetByteMatchSetOutput struct { // Information about the ByteMatchSet that you specified in the GetByteMatchSet // request. For more information, see the following topics: // - ByteMatchSet : Contains ByteMatchSetId , ByteMatchTuples , and Name // - ByteMatchTuples : Contains an array of ByteMatchTuple objects. Each // ByteMatchTuple object contains FieldToMatch , PositionalConstraint , // TargetString , and TextTransformation // - FieldToMatch : Contains Data and Type ByteMatchSet *types.ByteMatchSet // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationGetByteMatchSetMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson11_serializeOpGetByteMatchSet{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpGetByteMatchSet{}, middleware.After) if err != nil { return err } if err = addSetLoggerMiddleware(stack, options); err != nil { return err } if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { return err } if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { return err } if err = addRetryMiddlewares(stack, options); err != nil { return err } if err = addHTTPSignerV4Middleware(stack, options); err != nil { return err } if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { return err } if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack); err != nil { return err } if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { return err } if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } if err = addOpGetByteMatchSetValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetByteMatchSet(options.Region), middleware.Before); err != nil { return err } if err = awsmiddleware.AddRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { return err } if err = addResponseErrorMiddleware(stack); err != nil { return err } if err = addRequestResponseLogging(stack, options); err != nil { return err } return nil } func newServiceMetadataMiddleware_opGetByteMatchSet(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "waf-regional", OperationName: "GetByteMatchSet", } }
136
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package wafregional import ( "context" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // This is AWS WAF Classic documentation. For more information, see AWS WAF Classic (https://docs.aws.amazon.com/waf/latest/developerguide/classic-waf-chapter.html) // in the developer guide. For the latest version of AWS WAF, use the AWS WAFV2 API // and see the AWS WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html) // . With the latest version, AWS WAF has a single set of endpoints for regional // and global use. When you want to create, update, or delete AWS WAF objects, get // a change token and include the change token in the create, update, or delete // request. Change tokens ensure that your application doesn't submit conflicting // requests to AWS WAF. Each create, update, or delete request must use a unique // change token. If your application submits a GetChangeToken request and then // submits a second GetChangeToken request before submitting a create, update, or // delete request, the second GetChangeToken request returns the same value as the // first GetChangeToken request. When you use a change token in a create, update, // or delete request, the status of the change token changes to PENDING , which // indicates that AWS WAF is propagating the change to all AWS WAF servers. Use // GetChangeTokenStatus to determine the status of your change token. func (c *Client) GetChangeToken(ctx context.Context, params *GetChangeTokenInput, optFns ...func(*Options)) (*GetChangeTokenOutput, error) { if params == nil { params = &GetChangeTokenInput{} } result, metadata, err := c.invokeOperation(ctx, "GetChangeToken", params, optFns, c.addOperationGetChangeTokenMiddlewares) if err != nil { return nil, err } out := result.(*GetChangeTokenOutput) out.ResultMetadata = metadata return out, nil } type GetChangeTokenInput struct { noSmithyDocumentSerde } type GetChangeTokenOutput struct { // The ChangeToken that you used in the request. Use this value in a // GetChangeTokenStatus request to get the current status of the request. ChangeToken *string // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationGetChangeTokenMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson11_serializeOpGetChangeToken{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpGetChangeToken{}, middleware.After) if err != nil { return err } if err = addSetLoggerMiddleware(stack, options); err != nil { return err } if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { return err } if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { return err } if err = addRetryMiddlewares(stack, options); err != nil { return err } if err = addHTTPSignerV4Middleware(stack, options); err != nil { return err } if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { return err } if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack); err != nil { return err } if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { return err } if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetChangeToken(options.Region), middleware.Before); err != nil { return err } if err = awsmiddleware.AddRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { return err } if err = addResponseErrorMiddleware(stack); err != nil { return err } if err = addRequestResponseLogging(stack, options); err != nil { return err } return nil } func newServiceMetadataMiddleware_opGetChangeToken(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "waf-regional", OperationName: "GetChangeToken", } }
130
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package wafregional import ( "context" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/wafregional/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // This is AWS WAF Classic documentation. For more information, see AWS WAF Classic (https://docs.aws.amazon.com/waf/latest/developerguide/classic-waf-chapter.html) // in the developer guide. For the latest version of AWS WAF, use the AWS WAFV2 API // and see the AWS WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html) // . With the latest version, AWS WAF has a single set of endpoints for regional // and global use. Returns the status of a ChangeToken that you got by calling // GetChangeToken . ChangeTokenStatus is one of the following values: // - PROVISIONED : You requested the change token by calling GetChangeToken , but // you haven't used it yet in a call to create, update, or delete an AWS WAF // object. // - PENDING : AWS WAF is propagating the create, update, or delete request to // all AWS WAF servers. // - INSYNC : Propagation is complete. func (c *Client) GetChangeTokenStatus(ctx context.Context, params *GetChangeTokenStatusInput, optFns ...func(*Options)) (*GetChangeTokenStatusOutput, error) { if params == nil { params = &GetChangeTokenStatusInput{} } result, metadata, err := c.invokeOperation(ctx, "GetChangeTokenStatus", params, optFns, c.addOperationGetChangeTokenStatusMiddlewares) if err != nil { return nil, err } out := result.(*GetChangeTokenStatusOutput) out.ResultMetadata = metadata return out, nil } type GetChangeTokenStatusInput struct { // The change token for which you want to get the status. This change token was // previously returned in the GetChangeToken response. // // This member is required. ChangeToken *string noSmithyDocumentSerde } type GetChangeTokenStatusOutput struct { // The status of the change token. ChangeTokenStatus types.ChangeTokenStatus // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationGetChangeTokenStatusMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson11_serializeOpGetChangeTokenStatus{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpGetChangeTokenStatus{}, middleware.After) if err != nil { return err } if err = addSetLoggerMiddleware(stack, options); err != nil { return err } if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { return err } if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { return err } if err = addRetryMiddlewares(stack, options); err != nil { return err } if err = addHTTPSignerV4Middleware(stack, options); err != nil { return err } if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { return err } if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack); err != nil { return err } if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { return err } if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } if err = addOpGetChangeTokenStatusValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetChangeTokenStatus(options.Region), middleware.Before); err != nil { return err } if err = awsmiddleware.AddRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { return err } if err = addResponseErrorMiddleware(stack); err != nil { return err } if err = addRequestResponseLogging(stack, options); err != nil { return err } return nil } func newServiceMetadataMiddleware_opGetChangeTokenStatus(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "waf-regional", OperationName: "GetChangeTokenStatus", } }
137
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package wafregional import ( "context" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/wafregional/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // This is AWS WAF Classic documentation. For more information, see AWS WAF Classic (https://docs.aws.amazon.com/waf/latest/developerguide/classic-waf-chapter.html) // in the developer guide. For the latest version of AWS WAF, use the AWS WAFV2 API // and see the AWS WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html) // . With the latest version, AWS WAF has a single set of endpoints for regional // and global use. Returns the GeoMatchSet that is specified by GeoMatchSetId . func (c *Client) GetGeoMatchSet(ctx context.Context, params *GetGeoMatchSetInput, optFns ...func(*Options)) (*GetGeoMatchSetOutput, error) { if params == nil { params = &GetGeoMatchSetInput{} } result, metadata, err := c.invokeOperation(ctx, "GetGeoMatchSet", params, optFns, c.addOperationGetGeoMatchSetMiddlewares) if err != nil { return nil, err } out := result.(*GetGeoMatchSetOutput) out.ResultMetadata = metadata return out, nil } type GetGeoMatchSetInput struct { // The GeoMatchSetId of the GeoMatchSet that you want to get. GeoMatchSetId is // returned by CreateGeoMatchSet and by ListGeoMatchSets . // // This member is required. GeoMatchSetId *string noSmithyDocumentSerde } type GetGeoMatchSetOutput struct { // Information about the GeoMatchSet that you specified in the GetGeoMatchSet // request. This includes the Type , which for a GeoMatchContraint is always // Country , as well as the Value , which is the identifier for a specific country. GeoMatchSet *types.GeoMatchSet // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationGetGeoMatchSetMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson11_serializeOpGetGeoMatchSet{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpGetGeoMatchSet{}, middleware.After) if err != nil { return err } if err = addSetLoggerMiddleware(stack, options); err != nil { return err } if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { return err } if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { return err } if err = addRetryMiddlewares(stack, options); err != nil { return err } if err = addHTTPSignerV4Middleware(stack, options); err != nil { return err } if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { return err } if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack); err != nil { return err } if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { return err } if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } if err = addOpGetGeoMatchSetValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetGeoMatchSet(options.Region), middleware.Before); err != nil { return err } if err = awsmiddleware.AddRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { return err } if err = addResponseErrorMiddleware(stack); err != nil { return err } if err = addRequestResponseLogging(stack, options); err != nil { return err } return nil } func newServiceMetadataMiddleware_opGetGeoMatchSet(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "waf-regional", OperationName: "GetGeoMatchSet", } }
132
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package wafregional import ( "context" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/wafregional/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // This is AWS WAF Classic documentation. For more information, see AWS WAF Classic (https://docs.aws.amazon.com/waf/latest/developerguide/classic-waf-chapter.html) // in the developer guide. For the latest version of AWS WAF, use the AWS WAFV2 API // and see the AWS WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html) // . With the latest version, AWS WAF has a single set of endpoints for regional // and global use. Returns the IPSet that is specified by IPSetId . func (c *Client) GetIPSet(ctx context.Context, params *GetIPSetInput, optFns ...func(*Options)) (*GetIPSetOutput, error) { if params == nil { params = &GetIPSetInput{} } result, metadata, err := c.invokeOperation(ctx, "GetIPSet", params, optFns, c.addOperationGetIPSetMiddlewares) if err != nil { return nil, err } out := result.(*GetIPSetOutput) out.ResultMetadata = metadata return out, nil } type GetIPSetInput struct { // The IPSetId of the IPSet that you want to get. IPSetId is returned by // CreateIPSet and by ListIPSets . // // This member is required. IPSetId *string noSmithyDocumentSerde } type GetIPSetOutput struct { // Information about the IPSet that you specified in the GetIPSet request. For // more information, see the following topics: // - IPSet : Contains IPSetDescriptors , IPSetId , and Name // - IPSetDescriptors : Contains an array of IPSetDescriptor objects. Each // IPSetDescriptor object contains Type and Value IPSet *types.IPSet // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationGetIPSetMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson11_serializeOpGetIPSet{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpGetIPSet{}, middleware.After) if err != nil { return err } if err = addSetLoggerMiddleware(stack, options); err != nil { return err } if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { return err } if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { return err } if err = addRetryMiddlewares(stack, options); err != nil { return err } if err = addHTTPSignerV4Middleware(stack, options); err != nil { return err } if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { return err } if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack); err != nil { return err } if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { return err } if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } if err = addOpGetIPSetValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetIPSet(options.Region), middleware.Before); err != nil { return err } if err = awsmiddleware.AddRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { return err } if err = addResponseErrorMiddleware(stack); err != nil { return err } if err = addRequestResponseLogging(stack, options); err != nil { return err } return nil } func newServiceMetadataMiddleware_opGetIPSet(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "waf-regional", OperationName: "GetIPSet", } }
134
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package wafregional import ( "context" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/wafregional/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // This is AWS WAF Classic documentation. For more information, see AWS WAF Classic (https://docs.aws.amazon.com/waf/latest/developerguide/classic-waf-chapter.html) // in the developer guide. For the latest version of AWS WAF, use the AWS WAFV2 API // and see the AWS WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html) // . With the latest version, AWS WAF has a single set of endpoints for regional // and global use. Returns the LoggingConfiguration for the specified web ACL. func (c *Client) GetLoggingConfiguration(ctx context.Context, params *GetLoggingConfigurationInput, optFns ...func(*Options)) (*GetLoggingConfigurationOutput, error) { if params == nil { params = &GetLoggingConfigurationInput{} } result, metadata, err := c.invokeOperation(ctx, "GetLoggingConfiguration", params, optFns, c.addOperationGetLoggingConfigurationMiddlewares) if err != nil { return nil, err } out := result.(*GetLoggingConfigurationOutput) out.ResultMetadata = metadata return out, nil } type GetLoggingConfigurationInput struct { // The Amazon Resource Name (ARN) of the web ACL for which you want to get the // LoggingConfiguration . // // This member is required. ResourceArn *string noSmithyDocumentSerde } type GetLoggingConfigurationOutput struct { // The LoggingConfiguration for the specified web ACL. LoggingConfiguration *types.LoggingConfiguration // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationGetLoggingConfigurationMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson11_serializeOpGetLoggingConfiguration{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpGetLoggingConfiguration{}, middleware.After) if err != nil { return err } if err = addSetLoggerMiddleware(stack, options); err != nil { return err } if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { return err } if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { return err } if err = addRetryMiddlewares(stack, options); err != nil { return err } if err = addHTTPSignerV4Middleware(stack, options); err != nil { return err } if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { return err } if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack); err != nil { return err } if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { return err } if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } if err = addOpGetLoggingConfigurationValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetLoggingConfiguration(options.Region), middleware.Before); err != nil { return err } if err = awsmiddleware.AddRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { return err } if err = addResponseErrorMiddleware(stack); err != nil { return err } if err = addRequestResponseLogging(stack, options); err != nil { return err } return nil } func newServiceMetadataMiddleware_opGetLoggingConfiguration(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "waf-regional", OperationName: "GetLoggingConfiguration", } }
130
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package wafregional import ( "context" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // This is AWS WAF Classic documentation. For more information, see AWS WAF Classic (https://docs.aws.amazon.com/waf/latest/developerguide/classic-waf-chapter.html) // in the developer guide. For the latest version of AWS WAF, use the AWS WAFV2 API // and see the AWS WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html) // . With the latest version, AWS WAF has a single set of endpoints for regional // and global use. Returns the IAM policy attached to the RuleGroup. func (c *Client) GetPermissionPolicy(ctx context.Context, params *GetPermissionPolicyInput, optFns ...func(*Options)) (*GetPermissionPolicyOutput, error) { if params == nil { params = &GetPermissionPolicyInput{} } result, metadata, err := c.invokeOperation(ctx, "GetPermissionPolicy", params, optFns, c.addOperationGetPermissionPolicyMiddlewares) if err != nil { return nil, err } out := result.(*GetPermissionPolicyOutput) out.ResultMetadata = metadata return out, nil } type GetPermissionPolicyInput struct { // The Amazon Resource Name (ARN) of the RuleGroup for which you want to get the // policy. // // This member is required. ResourceArn *string noSmithyDocumentSerde } type GetPermissionPolicyOutput struct { // The IAM policy attached to the specified RuleGroup. Policy *string // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationGetPermissionPolicyMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson11_serializeOpGetPermissionPolicy{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpGetPermissionPolicy{}, middleware.After) if err != nil { return err } if err = addSetLoggerMiddleware(stack, options); err != nil { return err } if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { return err } if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { return err } if err = addRetryMiddlewares(stack, options); err != nil { return err } if err = addHTTPSignerV4Middleware(stack, options); err != nil { return err } if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { return err } if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack); err != nil { return err } if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { return err } if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } if err = addOpGetPermissionPolicyValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetPermissionPolicy(options.Region), middleware.Before); err != nil { return err } if err = awsmiddleware.AddRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { return err } if err = addResponseErrorMiddleware(stack); err != nil { return err } if err = addRequestResponseLogging(stack, options); err != nil { return err } return nil } func newServiceMetadataMiddleware_opGetPermissionPolicy(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "waf-regional", OperationName: "GetPermissionPolicy", } }
129
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package wafregional import ( "context" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/wafregional/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // This is AWS WAF Classic documentation. For more information, see AWS WAF Classic (https://docs.aws.amazon.com/waf/latest/developerguide/classic-waf-chapter.html) // in the developer guide. For the latest version of AWS WAF, use the AWS WAFV2 API // and see the AWS WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html) // . With the latest version, AWS WAF has a single set of endpoints for regional // and global use. Returns the RateBasedRule that is specified by the RuleId that // you included in the GetRateBasedRule request. func (c *Client) GetRateBasedRule(ctx context.Context, params *GetRateBasedRuleInput, optFns ...func(*Options)) (*GetRateBasedRuleOutput, error) { if params == nil { params = &GetRateBasedRuleInput{} } result, metadata, err := c.invokeOperation(ctx, "GetRateBasedRule", params, optFns, c.addOperationGetRateBasedRuleMiddlewares) if err != nil { return nil, err } out := result.(*GetRateBasedRuleOutput) out.ResultMetadata = metadata return out, nil } type GetRateBasedRuleInput struct { // The RuleId of the RateBasedRule that you want to get. RuleId is returned by // CreateRateBasedRule and by ListRateBasedRules . // // This member is required. RuleId *string noSmithyDocumentSerde } type GetRateBasedRuleOutput struct { // Information about the RateBasedRule that you specified in the GetRateBasedRule // request. Rule *types.RateBasedRule // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationGetRateBasedRuleMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson11_serializeOpGetRateBasedRule{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpGetRateBasedRule{}, middleware.After) if err != nil { return err } if err = addSetLoggerMiddleware(stack, options); err != nil { return err } if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { return err } if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { return err } if err = addRetryMiddlewares(stack, options); err != nil { return err } if err = addHTTPSignerV4Middleware(stack, options); err != nil { return err } if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { return err } if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack); err != nil { return err } if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { return err } if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } if err = addOpGetRateBasedRuleValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetRateBasedRule(options.Region), middleware.Before); err != nil { return err } if err = awsmiddleware.AddRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { return err } if err = addResponseErrorMiddleware(stack); err != nil { return err } if err = addRequestResponseLogging(stack, options); err != nil { return err } return nil } func newServiceMetadataMiddleware_opGetRateBasedRule(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "waf-regional", OperationName: "GetRateBasedRule", } }
132
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package wafregional import ( "context" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // This is AWS WAF Classic documentation. For more information, see AWS WAF Classic (https://docs.aws.amazon.com/waf/latest/developerguide/classic-waf-chapter.html) // in the developer guide. For the latest version of AWS WAF, use the AWS WAFV2 API // and see the AWS WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html) // . With the latest version, AWS WAF has a single set of endpoints for regional // and global use. Returns an array of IP addresses currently being blocked by the // RateBasedRule that is specified by the RuleId . The maximum number of managed // keys that will be blocked is 10,000. If more than 10,000 addresses exceed the // rate limit, the 10,000 addresses with the highest rates will be blocked. func (c *Client) GetRateBasedRuleManagedKeys(ctx context.Context, params *GetRateBasedRuleManagedKeysInput, optFns ...func(*Options)) (*GetRateBasedRuleManagedKeysOutput, error) { if params == nil { params = &GetRateBasedRuleManagedKeysInput{} } result, metadata, err := c.invokeOperation(ctx, "GetRateBasedRuleManagedKeys", params, optFns, c.addOperationGetRateBasedRuleManagedKeysMiddlewares) if err != nil { return nil, err } out := result.(*GetRateBasedRuleManagedKeysOutput) out.ResultMetadata = metadata return out, nil } type GetRateBasedRuleManagedKeysInput struct { // The RuleId of the RateBasedRule for which you want to get a list of ManagedKeys // . RuleId is returned by CreateRateBasedRule and by ListRateBasedRules . // // This member is required. RuleId *string // A null value and not currently used. Do not include this in your request. NextMarker *string noSmithyDocumentSerde } type GetRateBasedRuleManagedKeysOutput struct { // An array of IP addresses that currently are blocked by the specified // RateBasedRule . ManagedKeys []string // A null value and not currently used. NextMarker *string // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationGetRateBasedRuleManagedKeysMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson11_serializeOpGetRateBasedRuleManagedKeys{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpGetRateBasedRuleManagedKeys{}, middleware.After) if err != nil { return err } if err = addSetLoggerMiddleware(stack, options); err != nil { return err } if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { return err } if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { return err } if err = addRetryMiddlewares(stack, options); err != nil { return err } if err = addHTTPSignerV4Middleware(stack, options); err != nil { return err } if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { return err } if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack); err != nil { return err } if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { return err } if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } if err = addOpGetRateBasedRuleManagedKeysValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetRateBasedRuleManagedKeys(options.Region), middleware.Before); err != nil { return err } if err = awsmiddleware.AddRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { return err } if err = addResponseErrorMiddleware(stack); err != nil { return err } if err = addRequestResponseLogging(stack, options); err != nil { return err } return nil } func newServiceMetadataMiddleware_opGetRateBasedRuleManagedKeys(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "waf-regional", OperationName: "GetRateBasedRuleManagedKeys", } }
139
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package wafregional import ( "context" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/wafregional/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // This is AWS WAF Classic documentation. For more information, see AWS WAF Classic (https://docs.aws.amazon.com/waf/latest/developerguide/classic-waf-chapter.html) // in the developer guide. For the latest version of AWS WAF, use the AWS WAFV2 API // and see the AWS WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html) // . With the latest version, AWS WAF has a single set of endpoints for regional // and global use. Returns the RegexMatchSet specified by RegexMatchSetId . func (c *Client) GetRegexMatchSet(ctx context.Context, params *GetRegexMatchSetInput, optFns ...func(*Options)) (*GetRegexMatchSetOutput, error) { if params == nil { params = &GetRegexMatchSetInput{} } result, metadata, err := c.invokeOperation(ctx, "GetRegexMatchSet", params, optFns, c.addOperationGetRegexMatchSetMiddlewares) if err != nil { return nil, err } out := result.(*GetRegexMatchSetOutput) out.ResultMetadata = metadata return out, nil } type GetRegexMatchSetInput struct { // The RegexMatchSetId of the RegexMatchSet that you want to get. RegexMatchSetId // is returned by CreateRegexMatchSet and by ListRegexMatchSets . // // This member is required. RegexMatchSetId *string noSmithyDocumentSerde } type GetRegexMatchSetOutput struct { // Information about the RegexMatchSet that you specified in the GetRegexMatchSet // request. For more information, see RegexMatchTuple . RegexMatchSet *types.RegexMatchSet // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationGetRegexMatchSetMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson11_serializeOpGetRegexMatchSet{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpGetRegexMatchSet{}, middleware.After) if err != nil { return err } if err = addSetLoggerMiddleware(stack, options); err != nil { return err } if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { return err } if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { return err } if err = addRetryMiddlewares(stack, options); err != nil { return err } if err = addHTTPSignerV4Middleware(stack, options); err != nil { return err } if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { return err } if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack); err != nil { return err } if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { return err } if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } if err = addOpGetRegexMatchSetValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetRegexMatchSet(options.Region), middleware.Before); err != nil { return err } if err = awsmiddleware.AddRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { return err } if err = addResponseErrorMiddleware(stack); err != nil { return err } if err = addRequestResponseLogging(stack, options); err != nil { return err } return nil } func newServiceMetadataMiddleware_opGetRegexMatchSet(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "waf-regional", OperationName: "GetRegexMatchSet", } }
131
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package wafregional import ( "context" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/wafregional/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // This is AWS WAF Classic documentation. For more information, see AWS WAF Classic (https://docs.aws.amazon.com/waf/latest/developerguide/classic-waf-chapter.html) // in the developer guide. For the latest version of AWS WAF, use the AWS WAFV2 API // and see the AWS WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html) // . With the latest version, AWS WAF has a single set of endpoints for regional // and global use. Returns the RegexPatternSet specified by RegexPatternSetId . func (c *Client) GetRegexPatternSet(ctx context.Context, params *GetRegexPatternSetInput, optFns ...func(*Options)) (*GetRegexPatternSetOutput, error) { if params == nil { params = &GetRegexPatternSetInput{} } result, metadata, err := c.invokeOperation(ctx, "GetRegexPatternSet", params, optFns, c.addOperationGetRegexPatternSetMiddlewares) if err != nil { return nil, err } out := result.(*GetRegexPatternSetOutput) out.ResultMetadata = metadata return out, nil } type GetRegexPatternSetInput struct { // The RegexPatternSetId of the RegexPatternSet that you want to get. // RegexPatternSetId is returned by CreateRegexPatternSet and by // ListRegexPatternSets . // // This member is required. RegexPatternSetId *string noSmithyDocumentSerde } type GetRegexPatternSetOutput struct { // Information about the RegexPatternSet that you specified in the // GetRegexPatternSet request, including the identifier of the pattern set and the // regular expression patterns you want AWS WAF to search for. RegexPatternSet *types.RegexPatternSet // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationGetRegexPatternSetMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson11_serializeOpGetRegexPatternSet{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpGetRegexPatternSet{}, middleware.After) if err != nil { return err } if err = addSetLoggerMiddleware(stack, options); err != nil { return err } if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { return err } if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { return err } if err = addRetryMiddlewares(stack, options); err != nil { return err } if err = addHTTPSignerV4Middleware(stack, options); err != nil { return err } if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { return err } if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack); err != nil { return err } if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { return err } if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } if err = addOpGetRegexPatternSetValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetRegexPatternSet(options.Region), middleware.Before); err != nil { return err } if err = awsmiddleware.AddRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { return err } if err = addResponseErrorMiddleware(stack); err != nil { return err } if err = addRequestResponseLogging(stack, options); err != nil { return err } return nil } func newServiceMetadataMiddleware_opGetRegexPatternSet(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "waf-regional", OperationName: "GetRegexPatternSet", } }
133
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package wafregional import ( "context" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/wafregional/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // This is AWS WAF Classic documentation. For more information, see AWS WAF Classic (https://docs.aws.amazon.com/waf/latest/developerguide/classic-waf-chapter.html) // in the developer guide. For the latest version of AWS WAF, use the AWS WAFV2 API // and see the AWS WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html) // . With the latest version, AWS WAF has a single set of endpoints for regional // and global use. Returns the Rule that is specified by the RuleId that you // included in the GetRule request. func (c *Client) GetRule(ctx context.Context, params *GetRuleInput, optFns ...func(*Options)) (*GetRuleOutput, error) { if params == nil { params = &GetRuleInput{} } result, metadata, err := c.invokeOperation(ctx, "GetRule", params, optFns, c.addOperationGetRuleMiddlewares) if err != nil { return nil, err } out := result.(*GetRuleOutput) out.ResultMetadata = metadata return out, nil } type GetRuleInput struct { // The RuleId of the Rule that you want to get. RuleId is returned by CreateRule // and by ListRules . // // This member is required. RuleId *string noSmithyDocumentSerde } type GetRuleOutput struct { // Information about the Rule that you specified in the GetRule request. For more // information, see the following topics: // - Rule : Contains MetricName , Name , an array of Predicate objects, and // RuleId // - Predicate : Each Predicate object contains DataId , Negated , and Type Rule *types.Rule // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationGetRuleMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson11_serializeOpGetRule{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpGetRule{}, middleware.After) if err != nil { return err } if err = addSetLoggerMiddleware(stack, options); err != nil { return err } if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { return err } if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { return err } if err = addRetryMiddlewares(stack, options); err != nil { return err } if err = addHTTPSignerV4Middleware(stack, options); err != nil { return err } if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { return err } if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack); err != nil { return err } if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { return err } if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } if err = addOpGetRuleValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetRule(options.Region), middleware.Before); err != nil { return err } if err = awsmiddleware.AddRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { return err } if err = addResponseErrorMiddleware(stack); err != nil { return err } if err = addRequestResponseLogging(stack, options); err != nil { return err } return nil } func newServiceMetadataMiddleware_opGetRule(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "waf-regional", OperationName: "GetRule", } }
135
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package wafregional import ( "context" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/wafregional/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // This is AWS WAF Classic documentation. For more information, see AWS WAF Classic (https://docs.aws.amazon.com/waf/latest/developerguide/classic-waf-chapter.html) // in the developer guide. For the latest version of AWS WAF, use the AWS WAFV2 API // and see the AWS WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html) // . With the latest version, AWS WAF has a single set of endpoints for regional // and global use. Returns the RuleGroup that is specified by the RuleGroupId that // you included in the GetRuleGroup request. To view the rules in a rule group, // use ListActivatedRulesInRuleGroup . func (c *Client) GetRuleGroup(ctx context.Context, params *GetRuleGroupInput, optFns ...func(*Options)) (*GetRuleGroupOutput, error) { if params == nil { params = &GetRuleGroupInput{} } result, metadata, err := c.invokeOperation(ctx, "GetRuleGroup", params, optFns, c.addOperationGetRuleGroupMiddlewares) if err != nil { return nil, err } out := result.(*GetRuleGroupOutput) out.ResultMetadata = metadata return out, nil } type GetRuleGroupInput struct { // The RuleGroupId of the RuleGroup that you want to get. RuleGroupId is returned // by CreateRuleGroup and by ListRuleGroups . // // This member is required. RuleGroupId *string noSmithyDocumentSerde } type GetRuleGroupOutput struct { // Information about the RuleGroup that you specified in the GetRuleGroup request. RuleGroup *types.RuleGroup // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationGetRuleGroupMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson11_serializeOpGetRuleGroup{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpGetRuleGroup{}, middleware.After) if err != nil { return err } if err = addSetLoggerMiddleware(stack, options); err != nil { return err } if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { return err } if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { return err } if err = addRetryMiddlewares(stack, options); err != nil { return err } if err = addHTTPSignerV4Middleware(stack, options); err != nil { return err } if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { return err } if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack); err != nil { return err } if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { return err } if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } if err = addOpGetRuleGroupValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetRuleGroup(options.Region), middleware.Before); err != nil { return err } if err = awsmiddleware.AddRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { return err } if err = addResponseErrorMiddleware(stack); err != nil { return err } if err = addRequestResponseLogging(stack, options); err != nil { return err } return nil } func newServiceMetadataMiddleware_opGetRuleGroup(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "waf-regional", OperationName: "GetRuleGroup", } }
132
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package wafregional import ( "context" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/wafregional/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // This is AWS WAF Classic documentation. For more information, see AWS WAF Classic (https://docs.aws.amazon.com/waf/latest/developerguide/classic-waf-chapter.html) // in the developer guide. For the latest version of AWS WAF, use the AWS WAFV2 API // and see the AWS WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html) // . With the latest version, AWS WAF has a single set of endpoints for regional // and global use. Gets detailed information about a specified number of // requests--a sample--that AWS WAF randomly selects from among the first 5,000 // requests that your AWS resource received during a time range that you choose. // You can specify a sample size of up to 500 requests, and you can specify any // time range in the previous three hours. GetSampledRequests returns a time // range, which is usually the time range that you specified. However, if your // resource (such as a CloudFront distribution) received 5,000 requests before the // specified time range elapsed, GetSampledRequests returns an updated time range. // This new time range indicates the actual period during which AWS WAF selected // the requests in the sample. func (c *Client) GetSampledRequests(ctx context.Context, params *GetSampledRequestsInput, optFns ...func(*Options)) (*GetSampledRequestsOutput, error) { if params == nil { params = &GetSampledRequestsInput{} } result, metadata, err := c.invokeOperation(ctx, "GetSampledRequests", params, optFns, c.addOperationGetSampledRequestsMiddlewares) if err != nil { return nil, err } out := result.(*GetSampledRequestsOutput) out.ResultMetadata = metadata return out, nil } type GetSampledRequestsInput struct { // The number of requests that you want AWS WAF to return from among the first // 5,000 requests that your AWS resource received during the time range. If your // resource received fewer requests than the value of MaxItems , GetSampledRequests // returns information about all of them. // // This member is required. MaxItems int64 // RuleId is one of three values: // - The RuleId of the Rule or the RuleGroupId of the RuleGroup for which you // want GetSampledRequests to return a sample of requests. // - Default_Action , which causes GetSampledRequests to return a sample of the // requests that didn't match any of the rules in the specified WebACL . // // This member is required. RuleId *string // The start date and time and the end date and time of the range for which you // want GetSampledRequests to return a sample of requests. You must specify the // times in Coordinated Universal Time (UTC) format. UTC format includes the // special designator, Z . For example, "2016-09-27T14:50Z" . You can specify any // time range in the previous three hours. // // This member is required. TimeWindow *types.TimeWindow // The WebACLId of the WebACL for which you want GetSampledRequests to return a // sample of requests. // // This member is required. WebAclId *string noSmithyDocumentSerde } type GetSampledRequestsOutput struct { // The total number of requests from which GetSampledRequests got a sample of // MaxItems requests. If PopulationSize is less than MaxItems , the sample includes // every request that your AWS resource received during the specified time range. PopulationSize int64 // A complex type that contains detailed information about each of the requests in // the sample. SampledRequests []types.SampledHTTPRequest // Usually, TimeWindow is the time range that you specified in the // GetSampledRequests request. However, if your AWS resource received more than // 5,000 requests during the time range that you specified in the request, // GetSampledRequests returns the time range for the first 5,000 requests. Times // are in Coordinated Universal Time (UTC) format. TimeWindow *types.TimeWindow // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationGetSampledRequestsMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson11_serializeOpGetSampledRequests{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpGetSampledRequests{}, middleware.After) if err != nil { return err } if err = addSetLoggerMiddleware(stack, options); err != nil { return err } if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { return err } if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { return err } if err = addRetryMiddlewares(stack, options); err != nil { return err } if err = addHTTPSignerV4Middleware(stack, options); err != nil { return err } if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { return err } if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack); err != nil { return err } if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { return err } if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } if err = addOpGetSampledRequestsValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetSampledRequests(options.Region), middleware.Before); err != nil { return err } if err = awsmiddleware.AddRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { return err } if err = addResponseErrorMiddleware(stack); err != nil { return err } if err = addRequestResponseLogging(stack, options); err != nil { return err } return nil } func newServiceMetadataMiddleware_opGetSampledRequests(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "waf-regional", OperationName: "GetSampledRequests", } }
178
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package wafregional import ( "context" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/wafregional/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // This is AWS WAF Classic documentation. For more information, see AWS WAF Classic (https://docs.aws.amazon.com/waf/latest/developerguide/classic-waf-chapter.html) // in the developer guide. For the latest version of AWS WAF, use the AWS WAFV2 API // and see the AWS WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html) // . With the latest version, AWS WAF has a single set of endpoints for regional // and global use. Returns the SizeConstraintSet specified by SizeConstraintSetId . func (c *Client) GetSizeConstraintSet(ctx context.Context, params *GetSizeConstraintSetInput, optFns ...func(*Options)) (*GetSizeConstraintSetOutput, error) { if params == nil { params = &GetSizeConstraintSetInput{} } result, metadata, err := c.invokeOperation(ctx, "GetSizeConstraintSet", params, optFns, c.addOperationGetSizeConstraintSetMiddlewares) if err != nil { return nil, err } out := result.(*GetSizeConstraintSetOutput) out.ResultMetadata = metadata return out, nil } type GetSizeConstraintSetInput struct { // The SizeConstraintSetId of the SizeConstraintSet that you want to get. // SizeConstraintSetId is returned by CreateSizeConstraintSet and by // ListSizeConstraintSets . // // This member is required. SizeConstraintSetId *string noSmithyDocumentSerde } type GetSizeConstraintSetOutput struct { // Information about the SizeConstraintSet that you specified in the // GetSizeConstraintSet request. For more information, see the following topics: // - SizeConstraintSet : Contains SizeConstraintSetId , SizeConstraints , and // Name // - SizeConstraints : Contains an array of SizeConstraint objects. Each // SizeConstraint object contains FieldToMatch , TextTransformation , // ComparisonOperator , and Size // - FieldToMatch : Contains Data and Type SizeConstraintSet *types.SizeConstraintSet // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationGetSizeConstraintSetMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson11_serializeOpGetSizeConstraintSet{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpGetSizeConstraintSet{}, middleware.After) if err != nil { return err } if err = addSetLoggerMiddleware(stack, options); err != nil { return err } if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { return err } if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { return err } if err = addRetryMiddlewares(stack, options); err != nil { return err } if err = addHTTPSignerV4Middleware(stack, options); err != nil { return err } if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { return err } if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack); err != nil { return err } if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { return err } if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } if err = addOpGetSizeConstraintSetValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetSizeConstraintSet(options.Region), middleware.Before); err != nil { return err } if err = awsmiddleware.AddRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { return err } if err = addResponseErrorMiddleware(stack); err != nil { return err } if err = addRequestResponseLogging(stack, options); err != nil { return err } return nil } func newServiceMetadataMiddleware_opGetSizeConstraintSet(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "waf-regional", OperationName: "GetSizeConstraintSet", } }
138
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package wafregional import ( "context" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/wafregional/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // This is AWS WAF Classic documentation. For more information, see AWS WAF Classic (https://docs.aws.amazon.com/waf/latest/developerguide/classic-waf-chapter.html) // in the developer guide. For the latest version of AWS WAF, use the AWS WAFV2 API // and see the AWS WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html) // . With the latest version, AWS WAF has a single set of endpoints for regional // and global use. Returns the SqlInjectionMatchSet that is specified by // SqlInjectionMatchSetId . func (c *Client) GetSqlInjectionMatchSet(ctx context.Context, params *GetSqlInjectionMatchSetInput, optFns ...func(*Options)) (*GetSqlInjectionMatchSetOutput, error) { if params == nil { params = &GetSqlInjectionMatchSetInput{} } result, metadata, err := c.invokeOperation(ctx, "GetSqlInjectionMatchSet", params, optFns, c.addOperationGetSqlInjectionMatchSetMiddlewares) if err != nil { return nil, err } out := result.(*GetSqlInjectionMatchSetOutput) out.ResultMetadata = metadata return out, nil } // A request to get a SqlInjectionMatchSet . type GetSqlInjectionMatchSetInput struct { // The SqlInjectionMatchSetId of the SqlInjectionMatchSet that you want to get. // SqlInjectionMatchSetId is returned by CreateSqlInjectionMatchSet and by // ListSqlInjectionMatchSets . // // This member is required. SqlInjectionMatchSetId *string noSmithyDocumentSerde } // The response to a GetSqlInjectionMatchSet request. type GetSqlInjectionMatchSetOutput struct { // Information about the SqlInjectionMatchSet that you specified in the // GetSqlInjectionMatchSet request. For more information, see the following topics: // - SqlInjectionMatchSet : Contains Name , SqlInjectionMatchSetId , and an array // of SqlInjectionMatchTuple objects // - SqlInjectionMatchTuple : Each SqlInjectionMatchTuple object contains // FieldToMatch and TextTransformation // - FieldToMatch : Contains Data and Type SqlInjectionMatchSet *types.SqlInjectionMatchSet // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationGetSqlInjectionMatchSetMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson11_serializeOpGetSqlInjectionMatchSet{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpGetSqlInjectionMatchSet{}, middleware.After) if err != nil { return err } if err = addSetLoggerMiddleware(stack, options); err != nil { return err } if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { return err } if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { return err } if err = addRetryMiddlewares(stack, options); err != nil { return err } if err = addHTTPSignerV4Middleware(stack, options); err != nil { return err } if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { return err } if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack); err != nil { return err } if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { return err } if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } if err = addOpGetSqlInjectionMatchSetValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetSqlInjectionMatchSet(options.Region), middleware.Before); err != nil { return err } if err = awsmiddleware.AddRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { return err } if err = addResponseErrorMiddleware(stack); err != nil { return err } if err = addRequestResponseLogging(stack, options); err != nil { return err } return nil } func newServiceMetadataMiddleware_opGetSqlInjectionMatchSet(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "waf-regional", OperationName: "GetSqlInjectionMatchSet", } }
140
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package wafregional import ( "context" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/wafregional/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // This is AWS WAF Classic documentation. For more information, see AWS WAF Classic (https://docs.aws.amazon.com/waf/latest/developerguide/classic-waf-chapter.html) // in the developer guide. For the latest version of AWS WAF, use the AWS WAFV2 API // and see the AWS WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html) // . With the latest version, AWS WAF has a single set of endpoints for regional // and global use. Returns the WebACL that is specified by WebACLId . func (c *Client) GetWebACL(ctx context.Context, params *GetWebACLInput, optFns ...func(*Options)) (*GetWebACLOutput, error) { if params == nil { params = &GetWebACLInput{} } result, metadata, err := c.invokeOperation(ctx, "GetWebACL", params, optFns, c.addOperationGetWebACLMiddlewares) if err != nil { return nil, err } out := result.(*GetWebACLOutput) out.ResultMetadata = metadata return out, nil } type GetWebACLInput struct { // The WebACLId of the WebACL that you want to get. WebACLId is returned by // CreateWebACL and by ListWebACLs . // // This member is required. WebACLId *string noSmithyDocumentSerde } type GetWebACLOutput struct { // Information about the WebACL that you specified in the GetWebACL request. For // more information, see the following topics: // - WebACL : Contains DefaultAction , MetricName , Name , an array of Rule // objects, and WebACLId // - DefaultAction (Data type is WafAction ): Contains Type // - Rules : Contains an array of ActivatedRule objects, which contain Action , // Priority , and RuleId // - Action : Contains Type WebACL *types.WebACL // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationGetWebACLMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson11_serializeOpGetWebACL{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpGetWebACL{}, middleware.After) if err != nil { return err } if err = addSetLoggerMiddleware(stack, options); err != nil { return err } if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { return err } if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { return err } if err = addRetryMiddlewares(stack, options); err != nil { return err } if err = addHTTPSignerV4Middleware(stack, options); err != nil { return err } if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { return err } if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack); err != nil { return err } if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { return err } if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } if err = addOpGetWebACLValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetWebACL(options.Region), middleware.Before); err != nil { return err } if err = awsmiddleware.AddRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { return err } if err = addResponseErrorMiddleware(stack); err != nil { return err } if err = addRequestResponseLogging(stack, options); err != nil { return err } return nil } func newServiceMetadataMiddleware_opGetWebACL(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "waf-regional", OperationName: "GetWebACL", } }
137
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package wafregional import ( "context" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/wafregional/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // This is AWS WAF Classic Regional documentation. For more information, see AWS // WAF Classic (https://docs.aws.amazon.com/waf/latest/developerguide/classic-waf-chapter.html) // in the developer guide. For the latest version of AWS WAF, use the AWS WAFV2 API // and see the AWS WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html) // . With the latest version, AWS WAF has a single set of endpoints for regional // and global use. Returns the web ACL for the specified resource, either an // application load balancer or Amazon API Gateway stage. func (c *Client) GetWebACLForResource(ctx context.Context, params *GetWebACLForResourceInput, optFns ...func(*Options)) (*GetWebACLForResourceOutput, error) { if params == nil { params = &GetWebACLForResourceInput{} } result, metadata, err := c.invokeOperation(ctx, "GetWebACLForResource", params, optFns, c.addOperationGetWebACLForResourceMiddlewares) if err != nil { return nil, err } out := result.(*GetWebACLForResourceOutput) out.ResultMetadata = metadata return out, nil } type GetWebACLForResourceInput struct { // The ARN (Amazon Resource Name) of the resource for which to get the web ACL, // either an application load balancer or Amazon API Gateway stage. The ARN should // be in one of the following formats: // - For an Application Load Balancer: // arn:aws:elasticloadbalancing:region:account-id:loadbalancer/app/load-balancer-name/load-balancer-id // // - For an Amazon API Gateway stage: // arn:aws:apigateway:region::/restapis/api-id/stages/stage-name // // This member is required. ResourceArn *string noSmithyDocumentSerde } type GetWebACLForResourceOutput struct { // Information about the web ACL that you specified in the GetWebACLForResource // request. If there is no associated resource, a null WebACLSummary is returned. WebACLSummary *types.WebACLSummary // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationGetWebACLForResourceMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson11_serializeOpGetWebACLForResource{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpGetWebACLForResource{}, middleware.After) if err != nil { return err } if err = addSetLoggerMiddleware(stack, options); err != nil { return err } if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { return err } if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { return err } if err = addRetryMiddlewares(stack, options); err != nil { return err } if err = addHTTPSignerV4Middleware(stack, options); err != nil { return err } if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { return err } if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack); err != nil { return err } if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { return err } if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } if err = addOpGetWebACLForResourceValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetWebACLForResource(options.Region), middleware.Before); err != nil { return err } if err = awsmiddleware.AddRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { return err } if err = addResponseErrorMiddleware(stack); err != nil { return err } if err = addRequestResponseLogging(stack, options); err != nil { return err } return nil } func newServiceMetadataMiddleware_opGetWebACLForResource(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "waf-regional", OperationName: "GetWebACLForResource", } }
139
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package wafregional import ( "context" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/wafregional/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // This is AWS WAF Classic documentation. For more information, see AWS WAF Classic (https://docs.aws.amazon.com/waf/latest/developerguide/classic-waf-chapter.html) // in the developer guide. For the latest version of AWS WAF, use the AWS WAFV2 API // and see the AWS WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html) // . With the latest version, AWS WAF has a single set of endpoints for regional // and global use. Returns the XssMatchSet that is specified by XssMatchSetId . func (c *Client) GetXssMatchSet(ctx context.Context, params *GetXssMatchSetInput, optFns ...func(*Options)) (*GetXssMatchSetOutput, error) { if params == nil { params = &GetXssMatchSetInput{} } result, metadata, err := c.invokeOperation(ctx, "GetXssMatchSet", params, optFns, c.addOperationGetXssMatchSetMiddlewares) if err != nil { return nil, err } out := result.(*GetXssMatchSetOutput) out.ResultMetadata = metadata return out, nil } // A request to get an XssMatchSet . type GetXssMatchSetInput struct { // The XssMatchSetId of the XssMatchSet that you want to get. XssMatchSetId is // returned by CreateXssMatchSet and by ListXssMatchSets . // // This member is required. XssMatchSetId *string noSmithyDocumentSerde } // The response to a GetXssMatchSet request. type GetXssMatchSetOutput struct { // Information about the XssMatchSet that you specified in the GetXssMatchSet // request. For more information, see the following topics: // - XssMatchSet : Contains Name , XssMatchSetId , and an array of XssMatchTuple // objects // - XssMatchTuple : Each XssMatchTuple object contains FieldToMatch and // TextTransformation // - FieldToMatch : Contains Data and Type XssMatchSet *types.XssMatchSet // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationGetXssMatchSetMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson11_serializeOpGetXssMatchSet{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpGetXssMatchSet{}, middleware.After) if err != nil { return err } if err = addSetLoggerMiddleware(stack, options); err != nil { return err } if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { return err } if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { return err } if err = addRetryMiddlewares(stack, options); err != nil { return err } if err = addHTTPSignerV4Middleware(stack, options); err != nil { return err } if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { return err } if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack); err != nil { return err } if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { return err } if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } if err = addOpGetXssMatchSetValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetXssMatchSet(options.Region), middleware.Before); err != nil { return err } if err = awsmiddleware.AddRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { return err } if err = addResponseErrorMiddleware(stack); err != nil { return err } if err = addRequestResponseLogging(stack, options); err != nil { return err } return nil } func newServiceMetadataMiddleware_opGetXssMatchSet(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "waf-regional", OperationName: "GetXssMatchSet", } }
138
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package wafregional import ( "context" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/wafregional/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // This is AWS WAF Classic documentation. For more information, see AWS WAF Classic (https://docs.aws.amazon.com/waf/latest/developerguide/classic-waf-chapter.html) // in the developer guide. For the latest version of AWS WAF, use the AWS WAFV2 API // and see the AWS WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html) // . With the latest version, AWS WAF has a single set of endpoints for regional // and global use. Returns an array of ActivatedRule objects. func (c *Client) ListActivatedRulesInRuleGroup(ctx context.Context, params *ListActivatedRulesInRuleGroupInput, optFns ...func(*Options)) (*ListActivatedRulesInRuleGroupOutput, error) { if params == nil { params = &ListActivatedRulesInRuleGroupInput{} } result, metadata, err := c.invokeOperation(ctx, "ListActivatedRulesInRuleGroup", params, optFns, c.addOperationListActivatedRulesInRuleGroupMiddlewares) if err != nil { return nil, err } out := result.(*ListActivatedRulesInRuleGroupOutput) out.ResultMetadata = metadata return out, nil } type ListActivatedRulesInRuleGroupInput struct { // Specifies the number of ActivatedRules that you want AWS WAF to return for this // request. If you have more ActivatedRules than the number that you specify for // Limit , the response includes a NextMarker value that you can use to get // another batch of ActivatedRules . Limit int32 // If you specify a value for Limit and you have more ActivatedRules than the // value of Limit , AWS WAF returns a NextMarker value in the response that allows // you to list another group of ActivatedRules . For the second and subsequent // ListActivatedRulesInRuleGroup requests, specify the value of NextMarker from // the previous response to get information about another batch of ActivatedRules . NextMarker *string // The RuleGroupId of the RuleGroup for which you want to get a list of // ActivatedRule objects. RuleGroupId *string noSmithyDocumentSerde } type ListActivatedRulesInRuleGroupOutput struct { // An array of ActivatedRules objects. ActivatedRules []types.ActivatedRule // If you have more ActivatedRules than the number that you specified for Limit in // the request, the response includes a NextMarker value. To list more // ActivatedRules , submit another ListActivatedRulesInRuleGroup request, and // specify the NextMarker value from the response in the NextMarker value in the // next request. NextMarker *string // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationListActivatedRulesInRuleGroupMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson11_serializeOpListActivatedRulesInRuleGroup{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpListActivatedRulesInRuleGroup{}, middleware.After) if err != nil { return err } if err = addSetLoggerMiddleware(stack, options); err != nil { return err } if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { return err } if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { return err } if err = addRetryMiddlewares(stack, options); err != nil { return err } if err = addHTTPSignerV4Middleware(stack, options); err != nil { return err } if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { return err } if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack); err != nil { return err } if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { return err } if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListActivatedRulesInRuleGroup(options.Region), middleware.Before); err != nil { return err } if err = awsmiddleware.AddRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { return err } if err = addResponseErrorMiddleware(stack); err != nil { return err } if err = addRequestResponseLogging(stack, options); err != nil { return err } return nil } func newServiceMetadataMiddleware_opListActivatedRulesInRuleGroup(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "waf-regional", OperationName: "ListActivatedRulesInRuleGroup", } }
145
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package wafregional import ( "context" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/wafregional/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // This is AWS WAF Classic documentation. For more information, see AWS WAF Classic (https://docs.aws.amazon.com/waf/latest/developerguide/classic-waf-chapter.html) // in the developer guide. For the latest version of AWS WAF, use the AWS WAFV2 API // and see the AWS WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html) // . With the latest version, AWS WAF has a single set of endpoints for regional // and global use. Returns an array of ByteMatchSetSummary objects. func (c *Client) ListByteMatchSets(ctx context.Context, params *ListByteMatchSetsInput, optFns ...func(*Options)) (*ListByteMatchSetsOutput, error) { if params == nil { params = &ListByteMatchSetsInput{} } result, metadata, err := c.invokeOperation(ctx, "ListByteMatchSets", params, optFns, c.addOperationListByteMatchSetsMiddlewares) if err != nil { return nil, err } out := result.(*ListByteMatchSetsOutput) out.ResultMetadata = metadata return out, nil } type ListByteMatchSetsInput struct { // Specifies the number of ByteMatchSet objects that you want AWS WAF to return // for this request. If you have more ByteMatchSets objects than the number you // specify for Limit , the response includes a NextMarker value that you can use // to get another batch of ByteMatchSet objects. Limit int32 // If you specify a value for Limit and you have more ByteMatchSets than the value // of Limit , AWS WAF returns a NextMarker value in the response that allows you // to list another group of ByteMatchSets . For the second and subsequent // ListByteMatchSets requests, specify the value of NextMarker from the previous // response to get information about another batch of ByteMatchSets . NextMarker *string noSmithyDocumentSerde } type ListByteMatchSetsOutput struct { // An array of ByteMatchSetSummary objects. ByteMatchSets []types.ByteMatchSetSummary // If you have more ByteMatchSet objects than the number that you specified for // Limit in the request, the response includes a NextMarker value. To list more // ByteMatchSet objects, submit another ListByteMatchSets request, and specify the // NextMarker value from the response in the NextMarker value in the next request. NextMarker *string // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationListByteMatchSetsMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson11_serializeOpListByteMatchSets{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpListByteMatchSets{}, middleware.After) if err != nil { return err } if err = addSetLoggerMiddleware(stack, options); err != nil { return err } if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { return err } if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { return err } if err = addRetryMiddlewares(stack, options); err != nil { return err } if err = addHTTPSignerV4Middleware(stack, options); err != nil { return err } if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { return err } if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack); err != nil { return err } if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { return err } if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListByteMatchSets(options.Region), middleware.Before); err != nil { return err } if err = awsmiddleware.AddRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { return err } if err = addResponseErrorMiddleware(stack); err != nil { return err } if err = addRequestResponseLogging(stack, options); err != nil { return err } return nil } func newServiceMetadataMiddleware_opListByteMatchSets(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "waf-regional", OperationName: "ListByteMatchSets", } }
140
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package wafregional import ( "context" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/wafregional/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // This is AWS WAF Classic documentation. For more information, see AWS WAF Classic (https://docs.aws.amazon.com/waf/latest/developerguide/classic-waf-chapter.html) // in the developer guide. For the latest version of AWS WAF, use the AWS WAFV2 API // and see the AWS WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html) // . With the latest version, AWS WAF has a single set of endpoints for regional // and global use. Returns an array of GeoMatchSetSummary objects in the response. func (c *Client) ListGeoMatchSets(ctx context.Context, params *ListGeoMatchSetsInput, optFns ...func(*Options)) (*ListGeoMatchSetsOutput, error) { if params == nil { params = &ListGeoMatchSetsInput{} } result, metadata, err := c.invokeOperation(ctx, "ListGeoMatchSets", params, optFns, c.addOperationListGeoMatchSetsMiddlewares) if err != nil { return nil, err } out := result.(*ListGeoMatchSetsOutput) out.ResultMetadata = metadata return out, nil } type ListGeoMatchSetsInput struct { // Specifies the number of GeoMatchSet objects that you want AWS WAF to return for // this request. If you have more GeoMatchSet objects than the number you specify // for Limit , the response includes a NextMarker value that you can use to get // another batch of GeoMatchSet objects. Limit int32 // If you specify a value for Limit and you have more GeoMatchSet s than the value // of Limit , AWS WAF returns a NextMarker value in the response that allows you // to list another group of GeoMatchSet objects. For the second and subsequent // ListGeoMatchSets requests, specify the value of NextMarker from the previous // response to get information about another batch of GeoMatchSet objects. NextMarker *string noSmithyDocumentSerde } type ListGeoMatchSetsOutput struct { // An array of GeoMatchSetSummary objects. GeoMatchSets []types.GeoMatchSetSummary // If you have more GeoMatchSet objects than the number that you specified for // Limit in the request, the response includes a NextMarker value. To list more // GeoMatchSet objects, submit another ListGeoMatchSets request, and specify the // NextMarker value from the response in the NextMarker value in the next request. NextMarker *string // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationListGeoMatchSetsMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson11_serializeOpListGeoMatchSets{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpListGeoMatchSets{}, middleware.After) if err != nil { return err } if err = addSetLoggerMiddleware(stack, options); err != nil { return err } if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { return err } if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { return err } if err = addRetryMiddlewares(stack, options); err != nil { return err } if err = addHTTPSignerV4Middleware(stack, options); err != nil { return err } if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { return err } if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack); err != nil { return err } if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { return err } if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListGeoMatchSets(options.Region), middleware.Before); err != nil { return err } if err = awsmiddleware.AddRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { return err } if err = addResponseErrorMiddleware(stack); err != nil { return err } if err = addRequestResponseLogging(stack, options); err != nil { return err } return nil } func newServiceMetadataMiddleware_opListGeoMatchSets(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "waf-regional", OperationName: "ListGeoMatchSets", } }
140
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package wafregional import ( "context" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/wafregional/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // This is AWS WAF Classic documentation. For more information, see AWS WAF Classic (https://docs.aws.amazon.com/waf/latest/developerguide/classic-waf-chapter.html) // in the developer guide. For the latest version of AWS WAF, use the AWS WAFV2 API // and see the AWS WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html) // . With the latest version, AWS WAF has a single set of endpoints for regional // and global use. Returns an array of IPSetSummary objects in the response. func (c *Client) ListIPSets(ctx context.Context, params *ListIPSetsInput, optFns ...func(*Options)) (*ListIPSetsOutput, error) { if params == nil { params = &ListIPSetsInput{} } result, metadata, err := c.invokeOperation(ctx, "ListIPSets", params, optFns, c.addOperationListIPSetsMiddlewares) if err != nil { return nil, err } out := result.(*ListIPSetsOutput) out.ResultMetadata = metadata return out, nil } type ListIPSetsInput struct { // Specifies the number of IPSet objects that you want AWS WAF to return for this // request. If you have more IPSet objects than the number you specify for Limit , // the response includes a NextMarker value that you can use to get another batch // of IPSet objects. Limit int32 // AWS WAF returns a NextMarker value in the response that allows you to list // another group of IPSets . For the second and subsequent ListIPSets requests, // specify the value of NextMarker from the previous response to get information // about another batch of IPSets . NextMarker *string noSmithyDocumentSerde } type ListIPSetsOutput struct { // An array of IPSetSummary objects. IPSets []types.IPSetSummary // To list more IPSet objects, submit another ListIPSets request, and in the next // request use the NextMarker response value as the NextMarker value. NextMarker *string // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationListIPSetsMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson11_serializeOpListIPSets{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpListIPSets{}, middleware.After) if err != nil { return err } if err = addSetLoggerMiddleware(stack, options); err != nil { return err } if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { return err } if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { return err } if err = addRetryMiddlewares(stack, options); err != nil { return err } if err = addHTTPSignerV4Middleware(stack, options); err != nil { return err } if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { return err } if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack); err != nil { return err } if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { return err } if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListIPSets(options.Region), middleware.Before); err != nil { return err } if err = awsmiddleware.AddRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { return err } if err = addResponseErrorMiddleware(stack); err != nil { return err } if err = addRequestResponseLogging(stack, options); err != nil { return err } return nil } func newServiceMetadataMiddleware_opListIPSets(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "waf-regional", OperationName: "ListIPSets", } }
137
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package wafregional import ( "context" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/wafregional/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // This is AWS WAF Classic documentation. For more information, see AWS WAF Classic (https://docs.aws.amazon.com/waf/latest/developerguide/classic-waf-chapter.html) // in the developer guide. For the latest version of AWS WAF, use the AWS WAFV2 API // and see the AWS WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html) // . With the latest version, AWS WAF has a single set of endpoints for regional // and global use. Returns an array of LoggingConfiguration objects. func (c *Client) ListLoggingConfigurations(ctx context.Context, params *ListLoggingConfigurationsInput, optFns ...func(*Options)) (*ListLoggingConfigurationsOutput, error) { if params == nil { params = &ListLoggingConfigurationsInput{} } result, metadata, err := c.invokeOperation(ctx, "ListLoggingConfigurations", params, optFns, c.addOperationListLoggingConfigurationsMiddlewares) if err != nil { return nil, err } out := result.(*ListLoggingConfigurationsOutput) out.ResultMetadata = metadata return out, nil } type ListLoggingConfigurationsInput struct { // Specifies the number of LoggingConfigurations that you want AWS WAF to return // for this request. If you have more LoggingConfigurations than the number that // you specify for Limit , the response includes a NextMarker value that you can // use to get another batch of LoggingConfigurations . Limit int32 // If you specify a value for Limit and you have more LoggingConfigurations than // the value of Limit , AWS WAF returns a NextMarker value in the response that // allows you to list another group of LoggingConfigurations . For the second and // subsequent ListLoggingConfigurations requests, specify the value of NextMarker // from the previous response to get information about another batch of // ListLoggingConfigurations . NextMarker *string noSmithyDocumentSerde } type ListLoggingConfigurationsOutput struct { // An array of LoggingConfiguration objects. LoggingConfigurations []types.LoggingConfiguration // If you have more LoggingConfigurations than the number that you specified for // Limit in the request, the response includes a NextMarker value. To list more // LoggingConfigurations , submit another ListLoggingConfigurations request, and // specify the NextMarker value from the response in the NextMarker value in the // next request. NextMarker *string // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationListLoggingConfigurationsMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson11_serializeOpListLoggingConfigurations{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpListLoggingConfigurations{}, middleware.After) if err != nil { return err } if err = addSetLoggerMiddleware(stack, options); err != nil { return err } if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { return err } if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { return err } if err = addRetryMiddlewares(stack, options); err != nil { return err } if err = addHTTPSignerV4Middleware(stack, options); err != nil { return err } if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { return err } if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack); err != nil { return err } if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { return err } if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListLoggingConfigurations(options.Region), middleware.Before); err != nil { return err } if err = awsmiddleware.AddRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { return err } if err = addResponseErrorMiddleware(stack); err != nil { return err } if err = addRequestResponseLogging(stack, options); err != nil { return err } return nil } func newServiceMetadataMiddleware_opListLoggingConfigurations(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "waf-regional", OperationName: "ListLoggingConfigurations", } }
142
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package wafregional import ( "context" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/wafregional/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // This is AWS WAF Classic documentation. For more information, see AWS WAF Classic (https://docs.aws.amazon.com/waf/latest/developerguide/classic-waf-chapter.html) // in the developer guide. For the latest version of AWS WAF, use the AWS WAFV2 API // and see the AWS WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html) // . With the latest version, AWS WAF has a single set of endpoints for regional // and global use. Returns an array of RuleSummary objects. func (c *Client) ListRateBasedRules(ctx context.Context, params *ListRateBasedRulesInput, optFns ...func(*Options)) (*ListRateBasedRulesOutput, error) { if params == nil { params = &ListRateBasedRulesInput{} } result, metadata, err := c.invokeOperation(ctx, "ListRateBasedRules", params, optFns, c.addOperationListRateBasedRulesMiddlewares) if err != nil { return nil, err } out := result.(*ListRateBasedRulesOutput) out.ResultMetadata = metadata return out, nil } type ListRateBasedRulesInput struct { // Specifies the number of Rules that you want AWS WAF to return for this request. // If you have more Rules than the number that you specify for Limit , the response // includes a NextMarker value that you can use to get another batch of Rules . Limit int32 // If you specify a value for Limit and you have more Rules than the value of Limit // , AWS WAF returns a NextMarker value in the response that allows you to list // another group of Rules . For the second and subsequent ListRateBasedRules // requests, specify the value of NextMarker from the previous response to get // information about another batch of Rules . NextMarker *string noSmithyDocumentSerde } type ListRateBasedRulesOutput struct { // If you have more Rules than the number that you specified for Limit in the // request, the response includes a NextMarker value. To list more Rules , submit // another ListRateBasedRules request, and specify the NextMarker value from the // response in the NextMarker value in the next request. NextMarker *string // An array of RuleSummary objects. Rules []types.RuleSummary // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationListRateBasedRulesMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson11_serializeOpListRateBasedRules{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpListRateBasedRules{}, middleware.After) if err != nil { return err } if err = addSetLoggerMiddleware(stack, options); err != nil { return err } if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { return err } if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { return err } if err = addRetryMiddlewares(stack, options); err != nil { return err } if err = addHTTPSignerV4Middleware(stack, options); err != nil { return err } if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { return err } if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack); err != nil { return err } if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { return err } if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListRateBasedRules(options.Region), middleware.Before); err != nil { return err } if err = awsmiddleware.AddRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { return err } if err = addResponseErrorMiddleware(stack); err != nil { return err } if err = addRequestResponseLogging(stack, options); err != nil { return err } return nil } func newServiceMetadataMiddleware_opListRateBasedRules(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "waf-regional", OperationName: "ListRateBasedRules", } }
139
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package wafregional import ( "context" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/wafregional/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // This is AWS WAF Classic documentation. For more information, see AWS WAF Classic (https://docs.aws.amazon.com/waf/latest/developerguide/classic-waf-chapter.html) // in the developer guide. For the latest version of AWS WAF, use the AWS WAFV2 API // and see the AWS WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html) // . With the latest version, AWS WAF has a single set of endpoints for regional // and global use. Returns an array of RegexMatchSetSummary objects. func (c *Client) ListRegexMatchSets(ctx context.Context, params *ListRegexMatchSetsInput, optFns ...func(*Options)) (*ListRegexMatchSetsOutput, error) { if params == nil { params = &ListRegexMatchSetsInput{} } result, metadata, err := c.invokeOperation(ctx, "ListRegexMatchSets", params, optFns, c.addOperationListRegexMatchSetsMiddlewares) if err != nil { return nil, err } out := result.(*ListRegexMatchSetsOutput) out.ResultMetadata = metadata return out, nil } type ListRegexMatchSetsInput struct { // Specifies the number of RegexMatchSet objects that you want AWS WAF to return // for this request. If you have more RegexMatchSet objects than the number you // specify for Limit , the response includes a NextMarker value that you can use // to get another batch of RegexMatchSet objects. Limit int32 // If you specify a value for Limit and you have more RegexMatchSet objects than // the value of Limit , AWS WAF returns a NextMarker value in the response that // allows you to list another group of ByteMatchSets . For the second and // subsequent ListRegexMatchSets requests, specify the value of NextMarker from // the previous response to get information about another batch of RegexMatchSet // objects. NextMarker *string noSmithyDocumentSerde } type ListRegexMatchSetsOutput struct { // If you have more RegexMatchSet objects than the number that you specified for // Limit in the request, the response includes a NextMarker value. To list more // RegexMatchSet objects, submit another ListRegexMatchSets request, and specify // the NextMarker value from the response in the NextMarker value in the next // request. NextMarker *string // An array of RegexMatchSetSummary objects. RegexMatchSets []types.RegexMatchSetSummary // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationListRegexMatchSetsMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson11_serializeOpListRegexMatchSets{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpListRegexMatchSets{}, middleware.After) if err != nil { return err } if err = addSetLoggerMiddleware(stack, options); err != nil { return err } if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { return err } if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { return err } if err = addRetryMiddlewares(stack, options); err != nil { return err } if err = addHTTPSignerV4Middleware(stack, options); err != nil { return err } if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { return err } if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack); err != nil { return err } if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { return err } if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListRegexMatchSets(options.Region), middleware.Before); err != nil { return err } if err = awsmiddleware.AddRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { return err } if err = addResponseErrorMiddleware(stack); err != nil { return err } if err = addRequestResponseLogging(stack, options); err != nil { return err } return nil } func newServiceMetadataMiddleware_opListRegexMatchSets(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "waf-regional", OperationName: "ListRegexMatchSets", } }
142
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package wafregional import ( "context" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/wafregional/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // This is AWS WAF Classic documentation. For more information, see AWS WAF Classic (https://docs.aws.amazon.com/waf/latest/developerguide/classic-waf-chapter.html) // in the developer guide. For the latest version of AWS WAF, use the AWS WAFV2 API // and see the AWS WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html) // . With the latest version, AWS WAF has a single set of endpoints for regional // and global use. Returns an array of RegexPatternSetSummary objects. func (c *Client) ListRegexPatternSets(ctx context.Context, params *ListRegexPatternSetsInput, optFns ...func(*Options)) (*ListRegexPatternSetsOutput, error) { if params == nil { params = &ListRegexPatternSetsInput{} } result, metadata, err := c.invokeOperation(ctx, "ListRegexPatternSets", params, optFns, c.addOperationListRegexPatternSetsMiddlewares) if err != nil { return nil, err } out := result.(*ListRegexPatternSetsOutput) out.ResultMetadata = metadata return out, nil } type ListRegexPatternSetsInput struct { // Specifies the number of RegexPatternSet objects that you want AWS WAF to return // for this request. If you have more RegexPatternSet objects than the number you // specify for Limit , the response includes a NextMarker value that you can use // to get another batch of RegexPatternSet objects. Limit int32 // If you specify a value for Limit and you have more RegexPatternSet objects than // the value of Limit , AWS WAF returns a NextMarker value in the response that // allows you to list another group of RegexPatternSet objects. For the second and // subsequent ListRegexPatternSets requests, specify the value of NextMarker from // the previous response to get information about another batch of RegexPatternSet // objects. NextMarker *string noSmithyDocumentSerde } type ListRegexPatternSetsOutput struct { // If you have more RegexPatternSet objects than the number that you specified for // Limit in the request, the response includes a NextMarker value. To list more // RegexPatternSet objects, submit another ListRegexPatternSets request, and // specify the NextMarker value from the response in the NextMarker value in the // next request. NextMarker *string // An array of RegexPatternSetSummary objects. RegexPatternSets []types.RegexPatternSetSummary // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationListRegexPatternSetsMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson11_serializeOpListRegexPatternSets{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpListRegexPatternSets{}, middleware.After) if err != nil { return err } if err = addSetLoggerMiddleware(stack, options); err != nil { return err } if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { return err } if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { return err } if err = addRetryMiddlewares(stack, options); err != nil { return err } if err = addHTTPSignerV4Middleware(stack, options); err != nil { return err } if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { return err } if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack); err != nil { return err } if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { return err } if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListRegexPatternSets(options.Region), middleware.Before); err != nil { return err } if err = awsmiddleware.AddRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { return err } if err = addResponseErrorMiddleware(stack); err != nil { return err } if err = addRequestResponseLogging(stack, options); err != nil { return err } return nil } func newServiceMetadataMiddleware_opListRegexPatternSets(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "waf-regional", OperationName: "ListRegexPatternSets", } }
142
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package wafregional import ( "context" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/wafregional/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // This is AWS WAF Classic Regional documentation. For more information, see AWS // WAF Classic (https://docs.aws.amazon.com/waf/latest/developerguide/classic-waf-chapter.html) // in the developer guide. For the latest version of AWS WAF, use the AWS WAFV2 API // and see the AWS WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html) // . With the latest version, AWS WAF has a single set of endpoints for regional // and global use. Returns an array of resources associated with the specified web // ACL. func (c *Client) ListResourcesForWebACL(ctx context.Context, params *ListResourcesForWebACLInput, optFns ...func(*Options)) (*ListResourcesForWebACLOutput, error) { if params == nil { params = &ListResourcesForWebACLInput{} } result, metadata, err := c.invokeOperation(ctx, "ListResourcesForWebACL", params, optFns, c.addOperationListResourcesForWebACLMiddlewares) if err != nil { return nil, err } out := result.(*ListResourcesForWebACLOutput) out.ResultMetadata = metadata return out, nil } type ListResourcesForWebACLInput struct { // The unique identifier (ID) of the web ACL for which to list the associated // resources. // // This member is required. WebACLId *string // The type of resource to list, either an application load balancer or Amazon API // Gateway. ResourceType types.ResourceType noSmithyDocumentSerde } type ListResourcesForWebACLOutput struct { // An array of ARNs (Amazon Resource Names) of the resources associated with the // specified web ACL. An array with zero elements is returned if there are no // resources associated with the web ACL. ResourceArns []string // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationListResourcesForWebACLMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson11_serializeOpListResourcesForWebACL{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpListResourcesForWebACL{}, middleware.After) if err != nil { return err } if err = addSetLoggerMiddleware(stack, options); err != nil { return err } if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { return err } if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { return err } if err = addRetryMiddlewares(stack, options); err != nil { return err } if err = addHTTPSignerV4Middleware(stack, options); err != nil { return err } if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { return err } if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack); err != nil { return err } if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { return err } if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } if err = addOpListResourcesForWebACLValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListResourcesForWebACL(options.Region), middleware.Before); err != nil { return err } if err = awsmiddleware.AddRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { return err } if err = addResponseErrorMiddleware(stack); err != nil { return err } if err = addRequestResponseLogging(stack, options); err != nil { return err } return nil } func newServiceMetadataMiddleware_opListResourcesForWebACL(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "waf-regional", OperationName: "ListResourcesForWebACL", } }
138
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package wafregional import ( "context" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/wafregional/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // This is AWS WAF Classic documentation. For more information, see AWS WAF Classic (https://docs.aws.amazon.com/waf/latest/developerguide/classic-waf-chapter.html) // in the developer guide. For the latest version of AWS WAF, use the AWS WAFV2 API // and see the AWS WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html) // . With the latest version, AWS WAF has a single set of endpoints for regional // and global use. Returns an array of RuleGroup objects. func (c *Client) ListRuleGroups(ctx context.Context, params *ListRuleGroupsInput, optFns ...func(*Options)) (*ListRuleGroupsOutput, error) { if params == nil { params = &ListRuleGroupsInput{} } result, metadata, err := c.invokeOperation(ctx, "ListRuleGroups", params, optFns, c.addOperationListRuleGroupsMiddlewares) if err != nil { return nil, err } out := result.(*ListRuleGroupsOutput) out.ResultMetadata = metadata return out, nil } type ListRuleGroupsInput struct { // Specifies the number of RuleGroups that you want AWS WAF to return for this // request. If you have more RuleGroups than the number that you specify for Limit // , the response includes a NextMarker value that you can use to get another // batch of RuleGroups . Limit int32 // If you specify a value for Limit and you have more RuleGroups than the value of // Limit , AWS WAF returns a NextMarker value in the response that allows you to // list another group of RuleGroups . For the second and subsequent ListRuleGroups // requests, specify the value of NextMarker from the previous response to get // information about another batch of RuleGroups . NextMarker *string noSmithyDocumentSerde } type ListRuleGroupsOutput struct { // If you have more RuleGroups than the number that you specified for Limit in the // request, the response includes a NextMarker value. To list more RuleGroups , // submit another ListRuleGroups request, and specify the NextMarker value from // the response in the NextMarker value in the next request. NextMarker *string // An array of RuleGroup objects. RuleGroups []types.RuleGroupSummary // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationListRuleGroupsMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson11_serializeOpListRuleGroups{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpListRuleGroups{}, middleware.After) if err != nil { return err } if err = addSetLoggerMiddleware(stack, options); err != nil { return err } if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { return err } if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { return err } if err = addRetryMiddlewares(stack, options); err != nil { return err } if err = addHTTPSignerV4Middleware(stack, options); err != nil { return err } if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { return err } if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack); err != nil { return err } if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { return err } if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListRuleGroups(options.Region), middleware.Before); err != nil { return err } if err = awsmiddleware.AddRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { return err } if err = addResponseErrorMiddleware(stack); err != nil { return err } if err = addRequestResponseLogging(stack, options); err != nil { return err } return nil } func newServiceMetadataMiddleware_opListRuleGroups(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "waf-regional", OperationName: "ListRuleGroups", } }
140
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package wafregional import ( "context" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/wafregional/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // This is AWS WAF Classic documentation. For more information, see AWS WAF Classic (https://docs.aws.amazon.com/waf/latest/developerguide/classic-waf-chapter.html) // in the developer guide. For the latest version of AWS WAF, use the AWS WAFV2 API // and see the AWS WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html) // . With the latest version, AWS WAF has a single set of endpoints for regional // and global use. Returns an array of RuleSummary objects. func (c *Client) ListRules(ctx context.Context, params *ListRulesInput, optFns ...func(*Options)) (*ListRulesOutput, error) { if params == nil { params = &ListRulesInput{} } result, metadata, err := c.invokeOperation(ctx, "ListRules", params, optFns, c.addOperationListRulesMiddlewares) if err != nil { return nil, err } out := result.(*ListRulesOutput) out.ResultMetadata = metadata return out, nil } type ListRulesInput struct { // Specifies the number of Rules that you want AWS WAF to return for this request. // If you have more Rules than the number that you specify for Limit , the response // includes a NextMarker value that you can use to get another batch of Rules . Limit int32 // If you specify a value for Limit and you have more Rules than the value of Limit // , AWS WAF returns a NextMarker value in the response that allows you to list // another group of Rules . For the second and subsequent ListRules requests, // specify the value of NextMarker from the previous response to get information // about another batch of Rules . NextMarker *string noSmithyDocumentSerde } type ListRulesOutput struct { // If you have more Rules than the number that you specified for Limit in the // request, the response includes a NextMarker value. To list more Rules , submit // another ListRules request, and specify the NextMarker value from the response // in the NextMarker value in the next request. NextMarker *string // An array of RuleSummary objects. Rules []types.RuleSummary // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationListRulesMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson11_serializeOpListRules{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpListRules{}, middleware.After) if err != nil { return err } if err = addSetLoggerMiddleware(stack, options); err != nil { return err } if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { return err } if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { return err } if err = addRetryMiddlewares(stack, options); err != nil { return err } if err = addHTTPSignerV4Middleware(stack, options); err != nil { return err } if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { return err } if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack); err != nil { return err } if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { return err } if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListRules(options.Region), middleware.Before); err != nil { return err } if err = awsmiddleware.AddRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { return err } if err = addResponseErrorMiddleware(stack); err != nil { return err } if err = addRequestResponseLogging(stack, options); err != nil { return err } return nil } func newServiceMetadataMiddleware_opListRules(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "waf-regional", OperationName: "ListRules", } }
139
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package wafregional import ( "context" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/wafregional/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // This is AWS WAF Classic documentation. For more information, see AWS WAF Classic (https://docs.aws.amazon.com/waf/latest/developerguide/classic-waf-chapter.html) // in the developer guide. For the latest version of AWS WAF, use the AWS WAFV2 API // and see the AWS WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html) // . With the latest version, AWS WAF has a single set of endpoints for regional // and global use. Returns an array of SizeConstraintSetSummary objects. func (c *Client) ListSizeConstraintSets(ctx context.Context, params *ListSizeConstraintSetsInput, optFns ...func(*Options)) (*ListSizeConstraintSetsOutput, error) { if params == nil { params = &ListSizeConstraintSetsInput{} } result, metadata, err := c.invokeOperation(ctx, "ListSizeConstraintSets", params, optFns, c.addOperationListSizeConstraintSetsMiddlewares) if err != nil { return nil, err } out := result.(*ListSizeConstraintSetsOutput) out.ResultMetadata = metadata return out, nil } type ListSizeConstraintSetsInput struct { // Specifies the number of SizeConstraintSet objects that you want AWS WAF to // return for this request. If you have more SizeConstraintSets objects than the // number you specify for Limit , the response includes a NextMarker value that // you can use to get another batch of SizeConstraintSet objects. Limit int32 // If you specify a value for Limit and you have more SizeConstraintSets than the // value of Limit , AWS WAF returns a NextMarker value in the response that allows // you to list another group of SizeConstraintSets . For the second and subsequent // ListSizeConstraintSets requests, specify the value of NextMarker from the // previous response to get information about another batch of SizeConstraintSets . NextMarker *string noSmithyDocumentSerde } type ListSizeConstraintSetsOutput struct { // If you have more SizeConstraintSet objects than the number that you specified // for Limit in the request, the response includes a NextMarker value. To list // more SizeConstraintSet objects, submit another ListSizeConstraintSets request, // and specify the NextMarker value from the response in the NextMarker value in // the next request. NextMarker *string // An array of SizeConstraintSetSummary objects. SizeConstraintSets []types.SizeConstraintSetSummary // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationListSizeConstraintSetsMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson11_serializeOpListSizeConstraintSets{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpListSizeConstraintSets{}, middleware.After) if err != nil { return err } if err = addSetLoggerMiddleware(stack, options); err != nil { return err } if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { return err } if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { return err } if err = addRetryMiddlewares(stack, options); err != nil { return err } if err = addHTTPSignerV4Middleware(stack, options); err != nil { return err } if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { return err } if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack); err != nil { return err } if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { return err } if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListSizeConstraintSets(options.Region), middleware.Before); err != nil { return err } if err = awsmiddleware.AddRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { return err } if err = addResponseErrorMiddleware(stack); err != nil { return err } if err = addRequestResponseLogging(stack, options); err != nil { return err } return nil } func newServiceMetadataMiddleware_opListSizeConstraintSets(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "waf-regional", OperationName: "ListSizeConstraintSets", } }
141
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package wafregional import ( "context" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/wafregional/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // This is AWS WAF Classic documentation. For more information, see AWS WAF Classic (https://docs.aws.amazon.com/waf/latest/developerguide/classic-waf-chapter.html) // in the developer guide. For the latest version of AWS WAF, use the AWS WAFV2 API // and see the AWS WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html) // . With the latest version, AWS WAF has a single set of endpoints for regional // and global use. Returns an array of SqlInjectionMatchSet objects. func (c *Client) ListSqlInjectionMatchSets(ctx context.Context, params *ListSqlInjectionMatchSetsInput, optFns ...func(*Options)) (*ListSqlInjectionMatchSetsOutput, error) { if params == nil { params = &ListSqlInjectionMatchSetsInput{} } result, metadata, err := c.invokeOperation(ctx, "ListSqlInjectionMatchSets", params, optFns, c.addOperationListSqlInjectionMatchSetsMiddlewares) if err != nil { return nil, err } out := result.(*ListSqlInjectionMatchSetsOutput) out.ResultMetadata = metadata return out, nil } // A request to list the SqlInjectionMatchSet objects created by the current AWS // account. type ListSqlInjectionMatchSetsInput struct { // Specifies the number of SqlInjectionMatchSet objects that you want AWS WAF to // return for this request. If you have more SqlInjectionMatchSet objects than the // number you specify for Limit , the response includes a NextMarker value that // you can use to get another batch of Rules . Limit int32 // If you specify a value for Limit and you have more SqlInjectionMatchSet objects // than the value of Limit , AWS WAF returns a NextMarker value in the response // that allows you to list another group of SqlInjectionMatchSets . For the second // and subsequent ListSqlInjectionMatchSets requests, specify the value of // NextMarker from the previous response to get information about another batch of // SqlInjectionMatchSets . NextMarker *string noSmithyDocumentSerde } // The response to a ListSqlInjectionMatchSets request. type ListSqlInjectionMatchSetsOutput struct { // If you have more SqlInjectionMatchSet objects than the number that you // specified for Limit in the request, the response includes a NextMarker value. // To list more SqlInjectionMatchSet objects, submit another // ListSqlInjectionMatchSets request, and specify the NextMarker value from the // response in the NextMarker value in the next request. NextMarker *string // An array of SqlInjectionMatchSetSummary objects. SqlInjectionMatchSets []types.SqlInjectionMatchSetSummary // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationListSqlInjectionMatchSetsMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson11_serializeOpListSqlInjectionMatchSets{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpListSqlInjectionMatchSets{}, middleware.After) if err != nil { return err } if err = addSetLoggerMiddleware(stack, options); err != nil { return err } if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { return err } if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { return err } if err = addRetryMiddlewares(stack, options); err != nil { return err } if err = addHTTPSignerV4Middleware(stack, options); err != nil { return err } if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { return err } if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack); err != nil { return err } if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { return err } if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListSqlInjectionMatchSets(options.Region), middleware.Before); err != nil { return err } if err = awsmiddleware.AddRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { return err } if err = addResponseErrorMiddleware(stack); err != nil { return err } if err = addRequestResponseLogging(stack, options); err != nil { return err } return nil } func newServiceMetadataMiddleware_opListSqlInjectionMatchSets(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "waf-regional", OperationName: "ListSqlInjectionMatchSets", } }
145
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package wafregional import ( "context" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/wafregional/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // This is AWS WAF Classic documentation. For more information, see AWS WAF Classic (https://docs.aws.amazon.com/waf/latest/developerguide/classic-waf-chapter.html) // in the developer guide. For the latest version of AWS WAF, use the AWS WAFV2 API // and see the AWS WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html) // . With the latest version, AWS WAF has a single set of endpoints for regional // and global use. Returns an array of RuleGroup objects that you are subscribed // to. func (c *Client) ListSubscribedRuleGroups(ctx context.Context, params *ListSubscribedRuleGroupsInput, optFns ...func(*Options)) (*ListSubscribedRuleGroupsOutput, error) { if params == nil { params = &ListSubscribedRuleGroupsInput{} } result, metadata, err := c.invokeOperation(ctx, "ListSubscribedRuleGroups", params, optFns, c.addOperationListSubscribedRuleGroupsMiddlewares) if err != nil { return nil, err } out := result.(*ListSubscribedRuleGroupsOutput) out.ResultMetadata = metadata return out, nil } type ListSubscribedRuleGroupsInput struct { // Specifies the number of subscribed rule groups that you want AWS WAF to return // for this request. If you have more objects than the number you specify for Limit // , the response includes a NextMarker value that you can use to get another // batch of objects. Limit int32 // If you specify a value for Limit and you have more ByteMatchSets subscribed rule // groups than the value of Limit , AWS WAF returns a NextMarker value in the // response that allows you to list another group of subscribed rule groups. For // the second and subsequent ListSubscribedRuleGroupsRequest requests, specify the // value of NextMarker from the previous response to get information about another // batch of subscribed rule groups. NextMarker *string noSmithyDocumentSerde } type ListSubscribedRuleGroupsOutput struct { // If you have more objects than the number that you specified for Limit in the // request, the response includes a NextMarker value. To list more objects, submit // another ListSubscribedRuleGroups request, and specify the NextMarker value from // the response in the NextMarker value in the next request. NextMarker *string // An array of RuleGroup objects. RuleGroups []types.SubscribedRuleGroupSummary // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationListSubscribedRuleGroupsMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson11_serializeOpListSubscribedRuleGroups{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpListSubscribedRuleGroups{}, middleware.After) if err != nil { return err } if err = addSetLoggerMiddleware(stack, options); err != nil { return err } if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { return err } if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { return err } if err = addRetryMiddlewares(stack, options); err != nil { return err } if err = addHTTPSignerV4Middleware(stack, options); err != nil { return err } if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { return err } if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack); err != nil { return err } if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { return err } if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListSubscribedRuleGroups(options.Region), middleware.Before); err != nil { return err } if err = awsmiddleware.AddRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { return err } if err = addResponseErrorMiddleware(stack); err != nil { return err } if err = addRequestResponseLogging(stack, options); err != nil { return err } return nil } func newServiceMetadataMiddleware_opListSubscribedRuleGroups(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "waf-regional", OperationName: "ListSubscribedRuleGroups", } }
142
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package wafregional import ( "context" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/wafregional/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // This is AWS WAF Classic documentation. For more information, see AWS WAF Classic (https://docs.aws.amazon.com/waf/latest/developerguide/classic-waf-chapter.html) // in the developer guide. For the latest version of AWS WAF, use the AWS WAFV2 API // and see the AWS WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html) // . With the latest version, AWS WAF has a single set of endpoints for regional // and global use. Retrieves the tags associated with the specified AWS resource. // Tags are key:value pairs that you can use to categorize and manage your // resources, for purposes like billing. For example, you might set the tag key to // "customer" and the value to the customer name or ID. You can specify one or more // tags to add to each AWS resource, up to 50 tags for a resource. Tagging is only // available through the API, SDKs, and CLI. You can't manage or view tags through // the AWS WAF Classic console. You can tag the AWS resources that you manage // through AWS WAF Classic: web ACLs, rule groups, and rules. func (c *Client) ListTagsForResource(ctx context.Context, params *ListTagsForResourceInput, optFns ...func(*Options)) (*ListTagsForResourceOutput, error) { if params == nil { params = &ListTagsForResourceInput{} } result, metadata, err := c.invokeOperation(ctx, "ListTagsForResource", params, optFns, c.addOperationListTagsForResourceMiddlewares) if err != nil { return nil, err } out := result.(*ListTagsForResourceOutput) out.ResultMetadata = metadata return out, nil } type ListTagsForResourceInput struct { // // // This member is required. ResourceARN *string // Limit int32 // NextMarker *string noSmithyDocumentSerde } type ListTagsForResourceOutput struct { // NextMarker *string // TagInfoForResource *types.TagInfoForResource // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationListTagsForResourceMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson11_serializeOpListTagsForResource{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpListTagsForResource{}, middleware.After) if err != nil { return err } if err = addSetLoggerMiddleware(stack, options); err != nil { return err } if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { return err } if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { return err } if err = addRetryMiddlewares(stack, options); err != nil { return err } if err = addHTTPSignerV4Middleware(stack, options); err != nil { return err } if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { return err } if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack); err != nil { return err } if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { return err } if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } if err = addOpListTagsForResourceValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListTagsForResource(options.Region), middleware.Before); err != nil { return err } if err = awsmiddleware.AddRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { return err } if err = addResponseErrorMiddleware(stack); err != nil { return err } if err = addRequestResponseLogging(stack, options); err != nil { return err } return nil } func newServiceMetadataMiddleware_opListTagsForResource(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "waf-regional", OperationName: "ListTagsForResource", } }
145
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package wafregional import ( "context" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/wafregional/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // This is AWS WAF Classic documentation. For more information, see AWS WAF Classic (https://docs.aws.amazon.com/waf/latest/developerguide/classic-waf-chapter.html) // in the developer guide. For the latest version of AWS WAF, use the AWS WAFV2 API // and see the AWS WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html) // . With the latest version, AWS WAF has a single set of endpoints for regional // and global use. Returns an array of WebACLSummary objects in the response. func (c *Client) ListWebACLs(ctx context.Context, params *ListWebACLsInput, optFns ...func(*Options)) (*ListWebACLsOutput, error) { if params == nil { params = &ListWebACLsInput{} } result, metadata, err := c.invokeOperation(ctx, "ListWebACLs", params, optFns, c.addOperationListWebACLsMiddlewares) if err != nil { return nil, err } out := result.(*ListWebACLsOutput) out.ResultMetadata = metadata return out, nil } type ListWebACLsInput struct { // Specifies the number of WebACL objects that you want AWS WAF to return for this // request. If you have more WebACL objects than the number that you specify for // Limit , the response includes a NextMarker value that you can use to get // another batch of WebACL objects. Limit int32 // If you specify a value for Limit and you have more WebACL objects than the // number that you specify for Limit , AWS WAF returns a NextMarker value in the // response that allows you to list another group of WebACL objects. For the // second and subsequent ListWebACLs requests, specify the value of NextMarker // from the previous response to get information about another batch of WebACL // objects. NextMarker *string noSmithyDocumentSerde } type ListWebACLsOutput struct { // If you have more WebACL objects than the number that you specified for Limit in // the request, the response includes a NextMarker value. To list more WebACL // objects, submit another ListWebACLs request, and specify the NextMarker value // from the response in the NextMarker value in the next request. NextMarker *string // An array of WebACLSummary objects. WebACLs []types.WebACLSummary // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationListWebACLsMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson11_serializeOpListWebACLs{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpListWebACLs{}, middleware.After) if err != nil { return err } if err = addSetLoggerMiddleware(stack, options); err != nil { return err } if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { return err } if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { return err } if err = addRetryMiddlewares(stack, options); err != nil { return err } if err = addHTTPSignerV4Middleware(stack, options); err != nil { return err } if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { return err } if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack); err != nil { return err } if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { return err } if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListWebACLs(options.Region), middleware.Before); err != nil { return err } if err = awsmiddleware.AddRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { return err } if err = addResponseErrorMiddleware(stack); err != nil { return err } if err = addRequestResponseLogging(stack, options); err != nil { return err } return nil } func newServiceMetadataMiddleware_opListWebACLs(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "waf-regional", OperationName: "ListWebACLs", } }
141
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package wafregional import ( "context" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/wafregional/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // This is AWS WAF Classic documentation. For more information, see AWS WAF Classic (https://docs.aws.amazon.com/waf/latest/developerguide/classic-waf-chapter.html) // in the developer guide. For the latest version of AWS WAF, use the AWS WAFV2 API // and see the AWS WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html) // . With the latest version, AWS WAF has a single set of endpoints for regional // and global use. Returns an array of XssMatchSet objects. func (c *Client) ListXssMatchSets(ctx context.Context, params *ListXssMatchSetsInput, optFns ...func(*Options)) (*ListXssMatchSetsOutput, error) { if params == nil { params = &ListXssMatchSetsInput{} } result, metadata, err := c.invokeOperation(ctx, "ListXssMatchSets", params, optFns, c.addOperationListXssMatchSetsMiddlewares) if err != nil { return nil, err } out := result.(*ListXssMatchSetsOutput) out.ResultMetadata = metadata return out, nil } // A request to list the XssMatchSet objects created by the current AWS account. type ListXssMatchSetsInput struct { // Specifies the number of XssMatchSet objects that you want AWS WAF to return for // this request. If you have more XssMatchSet objects than the number you specify // for Limit , the response includes a NextMarker value that you can use to get // another batch of Rules . Limit int32 // If you specify a value for Limit and you have more XssMatchSet objects than the // value of Limit , AWS WAF returns a NextMarker value in the response that allows // you to list another group of XssMatchSets . For the second and subsequent // ListXssMatchSets requests, specify the value of NextMarker from the previous // response to get information about another batch of XssMatchSets . NextMarker *string noSmithyDocumentSerde } // The response to a ListXssMatchSets request. type ListXssMatchSetsOutput struct { // If you have more XssMatchSet objects than the number that you specified for // Limit in the request, the response includes a NextMarker value. To list more // XssMatchSet objects, submit another ListXssMatchSets request, and specify the // NextMarker value from the response in the NextMarker value in the next request. NextMarker *string // An array of XssMatchSetSummary objects. XssMatchSets []types.XssMatchSetSummary // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationListXssMatchSetsMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson11_serializeOpListXssMatchSets{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpListXssMatchSets{}, middleware.After) if err != nil { return err } if err = addSetLoggerMiddleware(stack, options); err != nil { return err } if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { return err } if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { return err } if err = addRetryMiddlewares(stack, options); err != nil { return err } if err = addHTTPSignerV4Middleware(stack, options); err != nil { return err } if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { return err } if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack); err != nil { return err } if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { return err } if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListXssMatchSets(options.Region), middleware.Before); err != nil { return err } if err = awsmiddleware.AddRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { return err } if err = addResponseErrorMiddleware(stack); err != nil { return err } if err = addRequestResponseLogging(stack, options); err != nil { return err } return nil } func newServiceMetadataMiddleware_opListXssMatchSets(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "waf-regional", OperationName: "ListXssMatchSets", } }
142
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package wafregional import ( "context" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/wafregional/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // This is AWS WAF Classic documentation. For more information, see AWS WAF Classic (https://docs.aws.amazon.com/waf/latest/developerguide/classic-waf-chapter.html) // in the developer guide. For the latest version of AWS WAF, use the AWS WAFV2 API // and see the AWS WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html) // . With the latest version, AWS WAF has a single set of endpoints for regional // and global use. Associates a LoggingConfiguration with a specified web ACL. You // can access information about all traffic that AWS WAF inspects using the // following steps: // - Create an Amazon Kinesis Data Firehose. Create the data firehose with a PUT // source and in the region that you are operating. However, if you are capturing // logs for Amazon CloudFront, always create the firehose in US East (N. Virginia). // Do not create the data firehose using a Kinesis stream as your source. // - Associate that firehose to your web ACL using a PutLoggingConfiguration // request. // // When you successfully enable logging using a PutLoggingConfiguration request, // AWS WAF will create a service linked role with the necessary permissions to // write logs to the Amazon Kinesis Data Firehose. For more information, see // Logging Web ACL Traffic Information (https://docs.aws.amazon.com/waf/latest/developerguide/logging.html) // in the AWS WAF Developer Guide. func (c *Client) PutLoggingConfiguration(ctx context.Context, params *PutLoggingConfigurationInput, optFns ...func(*Options)) (*PutLoggingConfigurationOutput, error) { if params == nil { params = &PutLoggingConfigurationInput{} } result, metadata, err := c.invokeOperation(ctx, "PutLoggingConfiguration", params, optFns, c.addOperationPutLoggingConfigurationMiddlewares) if err != nil { return nil, err } out := result.(*PutLoggingConfigurationOutput) out.ResultMetadata = metadata return out, nil } type PutLoggingConfigurationInput struct { // The Amazon Kinesis Data Firehose that contains the inspected traffic // information, the redacted fields details, and the Amazon Resource Name (ARN) of // the web ACL to monitor. When specifying Type in RedactedFields , you must use // one of the following values: URI , QUERY_STRING , HEADER , or METHOD . // // This member is required. LoggingConfiguration *types.LoggingConfiguration noSmithyDocumentSerde } type PutLoggingConfigurationOutput struct { // The LoggingConfiguration that you submitted in the request. LoggingConfiguration *types.LoggingConfiguration // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationPutLoggingConfigurationMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson11_serializeOpPutLoggingConfiguration{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpPutLoggingConfiguration{}, middleware.After) if err != nil { return err } if err = addSetLoggerMiddleware(stack, options); err != nil { return err } if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { return err } if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { return err } if err = addRetryMiddlewares(stack, options); err != nil { return err } if err = addHTTPSignerV4Middleware(stack, options); err != nil { return err } if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { return err } if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack); err != nil { return err } if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { return err } if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } if err = addOpPutLoggingConfigurationValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opPutLoggingConfiguration(options.Region), middleware.Before); err != nil { return err } if err = awsmiddleware.AddRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { return err } if err = addResponseErrorMiddleware(stack); err != nil { return err } if err = addRequestResponseLogging(stack, options); err != nil { return err } return nil } func newServiceMetadataMiddleware_opPutLoggingConfiguration(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "waf-regional", OperationName: "PutLoggingConfiguration", } }
146
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package wafregional import ( "context" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // This is AWS WAF Classic documentation. For more information, see AWS WAF Classic (https://docs.aws.amazon.com/waf/latest/developerguide/classic-waf-chapter.html) // in the developer guide. For the latest version of AWS WAF, use the AWS WAFV2 API // and see the AWS WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html) // . With the latest version, AWS WAF has a single set of endpoints for regional // and global use. Attaches an IAM policy to the specified resource. The only // supported use for this action is to share a RuleGroup across accounts. The // PutPermissionPolicy is subject to the following restrictions: // - You can attach only one policy with each PutPermissionPolicy request. // - The policy must include an Effect , Action and Principal . // - Effect must specify Allow . // - The Action in the policy must be waf:UpdateWebACL , // waf-regional:UpdateWebACL , waf:GetRuleGroup and waf-regional:GetRuleGroup . // Any extra or wildcard actions in the policy will be rejected. // - The policy cannot include a Resource parameter. // - The ARN in the request must be a valid WAF RuleGroup ARN and the RuleGroup // must exist in the same region. // - The user making the request must be the owner of the RuleGroup. // - Your policy must be composed using IAM Policy version 2012-10-17. // // For more information, see IAM Policies (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html) // . An example of a valid policy parameter is shown in the Examples section below. func (c *Client) PutPermissionPolicy(ctx context.Context, params *PutPermissionPolicyInput, optFns ...func(*Options)) (*PutPermissionPolicyOutput, error) { if params == nil { params = &PutPermissionPolicyInput{} } result, metadata, err := c.invokeOperation(ctx, "PutPermissionPolicy", params, optFns, c.addOperationPutPermissionPolicyMiddlewares) if err != nil { return nil, err } out := result.(*PutPermissionPolicyOutput) out.ResultMetadata = metadata return out, nil } type PutPermissionPolicyInput struct { // The policy to attach to the specified RuleGroup. // // This member is required. Policy *string // The Amazon Resource Name (ARN) of the RuleGroup to which you want to attach the // policy. // // This member is required. ResourceArn *string noSmithyDocumentSerde } type PutPermissionPolicyOutput struct { // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationPutPermissionPolicyMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson11_serializeOpPutPermissionPolicy{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpPutPermissionPolicy{}, middleware.After) if err != nil { return err } if err = addSetLoggerMiddleware(stack, options); err != nil { return err } if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { return err } if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { return err } if err = addRetryMiddlewares(stack, options); err != nil { return err } if err = addHTTPSignerV4Middleware(stack, options); err != nil { return err } if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { return err } if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack); err != nil { return err } if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { return err } if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } if err = addOpPutPermissionPolicyValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opPutPermissionPolicy(options.Region), middleware.Before); err != nil { return err } if err = awsmiddleware.AddRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { return err } if err = addResponseErrorMiddleware(stack); err != nil { return err } if err = addRequestResponseLogging(stack, options); err != nil { return err } return nil } func newServiceMetadataMiddleware_opPutPermissionPolicy(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "waf-regional", OperationName: "PutPermissionPolicy", } }
146
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package wafregional import ( "context" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/wafregional/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // This is AWS WAF Classic documentation. For more information, see AWS WAF Classic (https://docs.aws.amazon.com/waf/latest/developerguide/classic-waf-chapter.html) // in the developer guide. For the latest version of AWS WAF, use the AWS WAFV2 API // and see the AWS WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html) // . With the latest version, AWS WAF has a single set of endpoints for regional // and global use. Associates tags with the specified AWS resource. Tags are // key:value pairs that you can use to categorize and manage your resources, for // purposes like billing. For example, you might set the tag key to "customer" and // the value to the customer name or ID. You can specify one or more tags to add to // each AWS resource, up to 50 tags for a resource. Tagging is only available // through the API, SDKs, and CLI. You can't manage or view tags through the AWS // WAF Classic console. You can use this action to tag the AWS resources that you // manage through AWS WAF Classic: web ACLs, rule groups, and rules. func (c *Client) TagResource(ctx context.Context, params *TagResourceInput, optFns ...func(*Options)) (*TagResourceOutput, error) { if params == nil { params = &TagResourceInput{} } result, metadata, err := c.invokeOperation(ctx, "TagResource", params, optFns, c.addOperationTagResourceMiddlewares) if err != nil { return nil, err } out := result.(*TagResourceOutput) out.ResultMetadata = metadata return out, nil } type TagResourceInput struct { // // // This member is required. ResourceARN *string // // // This member is required. Tags []types.Tag noSmithyDocumentSerde } type TagResourceOutput struct { // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationTagResourceMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson11_serializeOpTagResource{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpTagResource{}, middleware.After) if err != nil { return err } if err = addSetLoggerMiddleware(stack, options); err != nil { return err } if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { return err } if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { return err } if err = addRetryMiddlewares(stack, options); err != nil { return err } if err = addHTTPSignerV4Middleware(stack, options); err != nil { return err } if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { return err } if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack); err != nil { return err } if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { return err } if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } if err = addOpTagResourceValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opTagResource(options.Region), middleware.Before); err != nil { return err } if err = awsmiddleware.AddRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { return err } if err = addResponseErrorMiddleware(stack); err != nil { return err } if err = addRequestResponseLogging(stack, options); err != nil { return err } return nil } func newServiceMetadataMiddleware_opTagResource(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "waf-regional", OperationName: "TagResource", } }
137
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package wafregional import ( "context" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // This is AWS WAF Classic documentation. For more information, see AWS WAF Classic (https://docs.aws.amazon.com/waf/latest/developerguide/classic-waf-chapter.html) // in the developer guide. For the latest version of AWS WAF, use the AWS WAFV2 API // and see the AWS WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html) // . With the latest version, AWS WAF has a single set of endpoints for regional // and global use. func (c *Client) UntagResource(ctx context.Context, params *UntagResourceInput, optFns ...func(*Options)) (*UntagResourceOutput, error) { if params == nil { params = &UntagResourceInput{} } result, metadata, err := c.invokeOperation(ctx, "UntagResource", params, optFns, c.addOperationUntagResourceMiddlewares) if err != nil { return nil, err } out := result.(*UntagResourceOutput) out.ResultMetadata = metadata return out, nil } type UntagResourceInput struct { // // // This member is required. ResourceARN *string // // // This member is required. TagKeys []string noSmithyDocumentSerde } type UntagResourceOutput struct { // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationUntagResourceMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson11_serializeOpUntagResource{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpUntagResource{}, middleware.After) if err != nil { return err } if err = addSetLoggerMiddleware(stack, options); err != nil { return err } if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { return err } if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { return err } if err = addRetryMiddlewares(stack, options); err != nil { return err } if err = addHTTPSignerV4Middleware(stack, options); err != nil { return err } if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { return err } if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack); err != nil { return err } if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { return err } if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } if err = addOpUntagResourceValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUntagResource(options.Region), middleware.Before); err != nil { return err } if err = awsmiddleware.AddRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { return err } if err = addResponseErrorMiddleware(stack); err != nil { return err } if err = addRequestResponseLogging(stack, options); err != nil { return err } return nil } func newServiceMetadataMiddleware_opUntagResource(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "waf-regional", OperationName: "UntagResource", } }
129
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package wafregional import ( "context" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/wafregional/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // This is AWS WAF Classic documentation. For more information, see AWS WAF Classic (https://docs.aws.amazon.com/waf/latest/developerguide/classic-waf-chapter.html) // in the developer guide. For the latest version of AWS WAF, use the AWS WAFV2 API // and see the AWS WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html) // . With the latest version, AWS WAF has a single set of endpoints for regional // and global use. Inserts or deletes ByteMatchTuple objects (filters) in a // ByteMatchSet . For each ByteMatchTuple object, you specify the following // values: // - Whether to insert or delete the object from the array. If you want to // change a ByteMatchSetUpdate object, you delete the existing object and add a // new one. // - The part of a web request that you want AWS WAF to inspect, such as a query // string or the value of the User-Agent header. // - The bytes (typically a string that corresponds with ASCII characters) that // you want AWS WAF to look for. For more information, including how you specify // the values for the AWS WAF API and the AWS CLI or SDKs, see TargetString in // the ByteMatchTuple data type. // - Where to look, such as at the beginning or the end of a query string. // - Whether to perform any conversions on the request, such as converting it to // lowercase, before inspecting it for the specified string. // // For example, you can add a ByteMatchSetUpdate object that matches web requests // in which User-Agent headers contain the string BadBot . You can then configure // AWS WAF to block those requests. To create and configure a ByteMatchSet , // perform the following steps: // - Create a ByteMatchSet. For more information, see CreateByteMatchSet . // - Use GetChangeToken to get the change token that you provide in the // ChangeToken parameter of an UpdateByteMatchSet request. // - Submit an UpdateByteMatchSet request to specify the part of the request that // you want AWS WAF to inspect (for example, the header or the URI) and the value // that you want AWS WAF to watch for. // // For more information about how to use the AWS WAF API to allow or block HTTP // requests, see the AWS WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/) // . func (c *Client) UpdateByteMatchSet(ctx context.Context, params *UpdateByteMatchSetInput, optFns ...func(*Options)) (*UpdateByteMatchSetOutput, error) { if params == nil { params = &UpdateByteMatchSetInput{} } result, metadata, err := c.invokeOperation(ctx, "UpdateByteMatchSet", params, optFns, c.addOperationUpdateByteMatchSetMiddlewares) if err != nil { return nil, err } out := result.(*UpdateByteMatchSetOutput) out.ResultMetadata = metadata return out, nil } type UpdateByteMatchSetInput struct { // The ByteMatchSetId of the ByteMatchSet that you want to update. ByteMatchSetId // is returned by CreateByteMatchSet and by ListByteMatchSets . // // This member is required. ByteMatchSetId *string // The value returned by the most recent call to GetChangeToken . // // This member is required. ChangeToken *string // An array of ByteMatchSetUpdate objects that you want to insert into or delete // from a ByteMatchSet . For more information, see the applicable data types: // - ByteMatchSetUpdate : Contains Action and ByteMatchTuple // - ByteMatchTuple : Contains FieldToMatch , PositionalConstraint , TargetString // , and TextTransformation // - FieldToMatch : Contains Data and Type // // This member is required. Updates []types.ByteMatchSetUpdate noSmithyDocumentSerde } type UpdateByteMatchSetOutput struct { // The ChangeToken that you used to submit the UpdateByteMatchSet request. You can // also use this value to query the status of the request. For more information, // see GetChangeTokenStatus . ChangeToken *string // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationUpdateByteMatchSetMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson11_serializeOpUpdateByteMatchSet{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpUpdateByteMatchSet{}, middleware.After) if err != nil { return err } if err = addSetLoggerMiddleware(stack, options); err != nil { return err } if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { return err } if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { return err } if err = addRetryMiddlewares(stack, options); err != nil { return err } if err = addHTTPSignerV4Middleware(stack, options); err != nil { return err } if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { return err } if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack); err != nil { return err } if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { return err } if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } if err = addOpUpdateByteMatchSetValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateByteMatchSet(options.Region), middleware.Before); err != nil { return err } if err = awsmiddleware.AddRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { return err } if err = addResponseErrorMiddleware(stack); err != nil { return err } if err = addRequestResponseLogging(stack, options); err != nil { return err } return nil } func newServiceMetadataMiddleware_opUpdateByteMatchSet(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "waf-regional", OperationName: "UpdateByteMatchSet", } }
176
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package wafregional import ( "context" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/wafregional/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // This is AWS WAF Classic documentation. For more information, see AWS WAF Classic (https://docs.aws.amazon.com/waf/latest/developerguide/classic-waf-chapter.html) // in the developer guide. For the latest version of AWS WAF, use the AWS WAFV2 API // and see the AWS WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html) // . With the latest version, AWS WAF has a single set of endpoints for regional // and global use. Inserts or deletes GeoMatchConstraint objects in an GeoMatchSet // . For each GeoMatchConstraint object, you specify the following values: // - Whether to insert or delete the object from the array. If you want to // change an GeoMatchConstraint object, you delete the existing object and add a // new one. // - The Type . The only valid value for Type is Country . // - The Value , which is a two character code for the country to add to the // GeoMatchConstraint object. Valid codes are listed in GeoMatchConstraint$Value // . // // To create and configure an GeoMatchSet , perform the following steps: // - Submit a CreateGeoMatchSet request. // - Use GetChangeToken to get the change token that you provide in the // ChangeToken parameter of an UpdateGeoMatchSet request. // - Submit an UpdateGeoMatchSet request to specify the country that you want AWS // WAF to watch for. // // When you update an GeoMatchSet , you specify the country that you want to add // and/or the country that you want to delete. If you want to change a country, you // delete the existing country and add the new one. For more information about how // to use the AWS WAF API to allow or block HTTP requests, see the AWS WAF // Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/) . func (c *Client) UpdateGeoMatchSet(ctx context.Context, params *UpdateGeoMatchSetInput, optFns ...func(*Options)) (*UpdateGeoMatchSetOutput, error) { if params == nil { params = &UpdateGeoMatchSetInput{} } result, metadata, err := c.invokeOperation(ctx, "UpdateGeoMatchSet", params, optFns, c.addOperationUpdateGeoMatchSetMiddlewares) if err != nil { return nil, err } out := result.(*UpdateGeoMatchSetOutput) out.ResultMetadata = metadata return out, nil } type UpdateGeoMatchSetInput struct { // The value returned by the most recent call to GetChangeToken . // // This member is required. ChangeToken *string // The GeoMatchSetId of the GeoMatchSet that you want to update. GeoMatchSetId is // returned by CreateGeoMatchSet and by ListGeoMatchSets . // // This member is required. GeoMatchSetId *string // An array of GeoMatchSetUpdate objects that you want to insert into or delete // from an GeoMatchSet . For more information, see the applicable data types: // - GeoMatchSetUpdate : Contains Action and GeoMatchConstraint // - GeoMatchConstraint : Contains Type and Value You can have only one Type and // Value per GeoMatchConstraint . To add multiple countries, include multiple // GeoMatchSetUpdate objects in your request. // // This member is required. Updates []types.GeoMatchSetUpdate noSmithyDocumentSerde } type UpdateGeoMatchSetOutput struct { // The ChangeToken that you used to submit the UpdateGeoMatchSet request. You can // also use this value to query the status of the request. For more information, // see GetChangeTokenStatus . ChangeToken *string // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationUpdateGeoMatchSetMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson11_serializeOpUpdateGeoMatchSet{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpUpdateGeoMatchSet{}, middleware.After) if err != nil { return err } if err = addSetLoggerMiddleware(stack, options); err != nil { return err } if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { return err } if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { return err } if err = addRetryMiddlewares(stack, options); err != nil { return err } if err = addHTTPSignerV4Middleware(stack, options); err != nil { return err } if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { return err } if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack); err != nil { return err } if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { return err } if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } if err = addOpUpdateGeoMatchSetValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateGeoMatchSet(options.Region), middleware.Before); err != nil { return err } if err = awsmiddleware.AddRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { return err } if err = addResponseErrorMiddleware(stack); err != nil { return err } if err = addRequestResponseLogging(stack, options); err != nil { return err } return nil } func newServiceMetadataMiddleware_opUpdateGeoMatchSet(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "waf-regional", OperationName: "UpdateGeoMatchSet", } }
168
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package wafregional import ( "context" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/wafregional/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // This is AWS WAF Classic documentation. For more information, see AWS WAF Classic (https://docs.aws.amazon.com/waf/latest/developerguide/classic-waf-chapter.html) // in the developer guide. For the latest version of AWS WAF, use the AWS WAFV2 API // and see the AWS WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html) // . With the latest version, AWS WAF has a single set of endpoints for regional // and global use. Inserts or deletes IPSetDescriptor objects in an IPSet . For // each IPSetDescriptor object, you specify the following values: // - Whether to insert or delete the object from the array. If you want to // change an IPSetDescriptor object, you delete the existing object and add a new // one. // - The IP address version, IPv4 or IPv6 . // - The IP address in CIDR notation, for example, 192.0.2.0/24 (for the range of // IP addresses from 192.0.2.0 to 192.0.2.255 ) or 192.0.2.44/32 (for the // individual IP address 192.0.2.44 ). // // AWS WAF supports IPv4 address ranges: /8 and any range between /16 through /32. // AWS WAF supports IPv6 address ranges: /24, /32, /48, /56, /64, and /128. For // more information about CIDR notation, see the Wikipedia entry Classless // Inter-Domain Routing (https://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing) // . IPv6 addresses can be represented using any of the following formats: // - 1111:0000:0000:0000:0000:0000:0000:0111/128 // - 1111:0:0:0:0:0:0:0111/128 // - 1111::0111/128 // - 1111::111/128 // // You use an IPSet to specify which web requests you want to allow or block based // on the IP addresses that the requests originated from. For example, if you're // receiving a lot of requests from one or a small number of IP addresses and you // want to block the requests, you can create an IPSet that specifies those IP // addresses, and then configure AWS WAF to block the requests. To create and // configure an IPSet , perform the following steps: // - Submit a CreateIPSet request. // - Use GetChangeToken to get the change token that you provide in the // ChangeToken parameter of an UpdateIPSet request. // - Submit an UpdateIPSet request to specify the IP addresses that you want AWS // WAF to watch for. // // When you update an IPSet , you specify the IP addresses that you want to add // and/or the IP addresses that you want to delete. If you want to change an IP // address, you delete the existing IP address and add the new one. You can insert // a maximum of 1000 addresses in a single request. For more information about how // to use the AWS WAF API to allow or block HTTP requests, see the AWS WAF // Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/) . func (c *Client) UpdateIPSet(ctx context.Context, params *UpdateIPSetInput, optFns ...func(*Options)) (*UpdateIPSetOutput, error) { if params == nil { params = &UpdateIPSetInput{} } result, metadata, err := c.invokeOperation(ctx, "UpdateIPSet", params, optFns, c.addOperationUpdateIPSetMiddlewares) if err != nil { return nil, err } out := result.(*UpdateIPSetOutput) out.ResultMetadata = metadata return out, nil } type UpdateIPSetInput struct { // The value returned by the most recent call to GetChangeToken . // // This member is required. ChangeToken *string // The IPSetId of the IPSet that you want to update. IPSetId is returned by // CreateIPSet and by ListIPSets . // // This member is required. IPSetId *string // An array of IPSetUpdate objects that you want to insert into or delete from an // IPSet . For more information, see the applicable data types: // - IPSetUpdate : Contains Action and IPSetDescriptor // - IPSetDescriptor : Contains Type and Value // You can insert a maximum of 1000 addresses in a single request. // // This member is required. Updates []types.IPSetUpdate noSmithyDocumentSerde } type UpdateIPSetOutput struct { // The ChangeToken that you used to submit the UpdateIPSet request. You can also // use this value to query the status of the request. For more information, see // GetChangeTokenStatus . ChangeToken *string // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationUpdateIPSetMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson11_serializeOpUpdateIPSet{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpUpdateIPSet{}, middleware.After) if err != nil { return err } if err = addSetLoggerMiddleware(stack, options); err != nil { return err } if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { return err } if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { return err } if err = addRetryMiddlewares(stack, options); err != nil { return err } if err = addHTTPSignerV4Middleware(stack, options); err != nil { return err } if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { return err } if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack); err != nil { return err } if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { return err } if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } if err = addOpUpdateIPSetValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateIPSet(options.Region), middleware.Before); err != nil { return err } if err = awsmiddleware.AddRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { return err } if err = addResponseErrorMiddleware(stack); err != nil { return err } if err = addRequestResponseLogging(stack, options); err != nil { return err } return nil } func newServiceMetadataMiddleware_opUpdateIPSet(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "waf-regional", OperationName: "UpdateIPSet", } }
183
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package wafregional import ( "context" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/wafregional/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // This is AWS WAF Classic documentation. For more information, see AWS WAF Classic (https://docs.aws.amazon.com/waf/latest/developerguide/classic-waf-chapter.html) // in the developer guide. For the latest version of AWS WAF, use the AWS WAFV2 API // and see the AWS WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html) // . With the latest version, AWS WAF has a single set of endpoints for regional // and global use. Inserts or deletes Predicate objects in a rule and updates the // RateLimit in the rule. Each Predicate object identifies a predicate, such as a // ByteMatchSet or an IPSet , that specifies the web requests that you want to // block or count. The RateLimit specifies the number of requests every five // minutes that triggers the rule. If you add more than one predicate to a // RateBasedRule , a request must match all the predicates and exceed the RateLimit // to be counted or blocked. For example, suppose you add the following to a // RateBasedRule : // - An IPSet that matches the IP address 192.0.2.44/32 // - A ByteMatchSet that matches BadBot in the User-Agent header // // Further, you specify a RateLimit of 1,000. You then add the RateBasedRule to a // WebACL and specify that you want to block requests that satisfy the rule. For a // request to be blocked, it must come from the IP address 192.0.2.44 and the // User-Agent header in the request must contain the value BadBot . Further, // requests that match these two conditions much be received at a rate of more than // 1,000 every five minutes. If the rate drops below this limit, AWS WAF no longer // blocks the requests. As a second example, suppose you want to limit requests to // a particular page on your site. To do this, you could add the following to a // RateBasedRule : // - A ByteMatchSet with FieldToMatch of URI // - A PositionalConstraint of STARTS_WITH // - A TargetString of login // // Further, you specify a RateLimit of 1,000. By adding this RateBasedRule to a // WebACL , you could limit requests to your login page without affecting the rest // of your site. func (c *Client) UpdateRateBasedRule(ctx context.Context, params *UpdateRateBasedRuleInput, optFns ...func(*Options)) (*UpdateRateBasedRuleOutput, error) { if params == nil { params = &UpdateRateBasedRuleInput{} } result, metadata, err := c.invokeOperation(ctx, "UpdateRateBasedRule", params, optFns, c.addOperationUpdateRateBasedRuleMiddlewares) if err != nil { return nil, err } out := result.(*UpdateRateBasedRuleOutput) out.ResultMetadata = metadata return out, nil } type UpdateRateBasedRuleInput struct { // The value returned by the most recent call to GetChangeToken . // // This member is required. ChangeToken *string // The maximum number of requests, which have an identical value in the field // specified by the RateKey , allowed in a five-minute period. If the number of // requests exceeds the RateLimit and the other predicates specified in the rule // are also met, AWS WAF triggers the action that is specified for this rule. // // This member is required. RateLimit int64 // The RuleId of the RateBasedRule that you want to update. RuleId is returned by // CreateRateBasedRule and by ListRateBasedRules . // // This member is required. RuleId *string // An array of RuleUpdate objects that you want to insert into or delete from a // RateBasedRule . // // This member is required. Updates []types.RuleUpdate noSmithyDocumentSerde } type UpdateRateBasedRuleOutput struct { // The ChangeToken that you used to submit the UpdateRateBasedRule request. You // can also use this value to query the status of the request. For more // information, see GetChangeTokenStatus . ChangeToken *string // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationUpdateRateBasedRuleMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson11_serializeOpUpdateRateBasedRule{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpUpdateRateBasedRule{}, middleware.After) if err != nil { return err } if err = addSetLoggerMiddleware(stack, options); err != nil { return err } if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { return err } if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { return err } if err = addRetryMiddlewares(stack, options); err != nil { return err } if err = addHTTPSignerV4Middleware(stack, options); err != nil { return err } if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { return err } if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack); err != nil { return err } if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { return err } if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } if err = addOpUpdateRateBasedRuleValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateRateBasedRule(options.Region), middleware.Before); err != nil { return err } if err = awsmiddleware.AddRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { return err } if err = addResponseErrorMiddleware(stack); err != nil { return err } if err = addRequestResponseLogging(stack, options); err != nil { return err } return nil } func newServiceMetadataMiddleware_opUpdateRateBasedRule(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "waf-regional", OperationName: "UpdateRateBasedRule", } }
177
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package wafregional import ( "context" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/wafregional/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // This is AWS WAF Classic documentation. For more information, see AWS WAF Classic (https://docs.aws.amazon.com/waf/latest/developerguide/classic-waf-chapter.html) // in the developer guide. For the latest version of AWS WAF, use the AWS WAFV2 API // and see the AWS WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html) // . With the latest version, AWS WAF has a single set of endpoints for regional // and global use. Inserts or deletes RegexMatchTuple objects (filters) in a // RegexMatchSet . For each RegexMatchSetUpdate object, you specify the following // values: // - Whether to insert or delete the object from the array. If you want to // change a RegexMatchSetUpdate object, you delete the existing object and add a // new one. // - The part of a web request that you want AWS WAF to inspectupdate, such as a // query string or the value of the User-Agent header. // - The identifier of the pattern (a regular expression) that you want AWS WAF // to look for. For more information, see RegexPatternSet . // - Whether to perform any conversions on the request, such as converting it to // lowercase, before inspecting it for the specified string. // // For example, you can create a RegexPatternSet that matches any requests with // User-Agent headers that contain the string B[a@]dB[o0]t . You can then configure // AWS WAF to reject those requests. To create and configure a RegexMatchSet , // perform the following steps: // - Create a RegexMatchSet. For more information, see CreateRegexMatchSet . // - Use GetChangeToken to get the change token that you provide in the // ChangeToken parameter of an UpdateRegexMatchSet request. // - Submit an UpdateRegexMatchSet request to specify the part of the request // that you want AWS WAF to inspect (for example, the header or the URI) and the // identifier of the RegexPatternSet that contain the regular expression patters // you want AWS WAF to watch for. // // For more information about how to use the AWS WAF API to allow or block HTTP // requests, see the AWS WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/) // . func (c *Client) UpdateRegexMatchSet(ctx context.Context, params *UpdateRegexMatchSetInput, optFns ...func(*Options)) (*UpdateRegexMatchSetOutput, error) { if params == nil { params = &UpdateRegexMatchSetInput{} } result, metadata, err := c.invokeOperation(ctx, "UpdateRegexMatchSet", params, optFns, c.addOperationUpdateRegexMatchSetMiddlewares) if err != nil { return nil, err } out := result.(*UpdateRegexMatchSetOutput) out.ResultMetadata = metadata return out, nil } type UpdateRegexMatchSetInput struct { // The value returned by the most recent call to GetChangeToken . // // This member is required. ChangeToken *string // The RegexMatchSetId of the RegexMatchSet that you want to update. // RegexMatchSetId is returned by CreateRegexMatchSet and by ListRegexMatchSets . // // This member is required. RegexMatchSetId *string // An array of RegexMatchSetUpdate objects that you want to insert into or delete // from a RegexMatchSet . For more information, see RegexMatchTuple . // // This member is required. Updates []types.RegexMatchSetUpdate noSmithyDocumentSerde } type UpdateRegexMatchSetOutput struct { // The ChangeToken that you used to submit the UpdateRegexMatchSet request. You // can also use this value to query the status of the request. For more // information, see GetChangeTokenStatus . ChangeToken *string // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationUpdateRegexMatchSetMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson11_serializeOpUpdateRegexMatchSet{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpUpdateRegexMatchSet{}, middleware.After) if err != nil { return err } if err = addSetLoggerMiddleware(stack, options); err != nil { return err } if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { return err } if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { return err } if err = addRetryMiddlewares(stack, options); err != nil { return err } if err = addHTTPSignerV4Middleware(stack, options); err != nil { return err } if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { return err } if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack); err != nil { return err } if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { return err } if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } if err = addOpUpdateRegexMatchSetValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateRegexMatchSet(options.Region), middleware.Before); err != nil { return err } if err = awsmiddleware.AddRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { return err } if err = addResponseErrorMiddleware(stack); err != nil { return err } if err = addRequestResponseLogging(stack, options); err != nil { return err } return nil } func newServiceMetadataMiddleware_opUpdateRegexMatchSet(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "waf-regional", OperationName: "UpdateRegexMatchSet", } }
170
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package wafregional import ( "context" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/wafregional/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // This is AWS WAF Classic documentation. For more information, see AWS WAF Classic (https://docs.aws.amazon.com/waf/latest/developerguide/classic-waf-chapter.html) // in the developer guide. For the latest version of AWS WAF, use the AWS WAFV2 API // and see the AWS WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html) // . With the latest version, AWS WAF has a single set of endpoints for regional // and global use. Inserts or deletes RegexPatternString objects in a // RegexPatternSet . For each RegexPatternString object, you specify the following // values: // - Whether to insert or delete the RegexPatternString . // - The regular expression pattern that you want to insert or delete. For more // information, see RegexPatternSet . // // For example, you can create a RegexPatternString such as B[a@]dB[o0]t . AWS WAF // will match this RegexPatternString to: // - BadBot // - BadB0t // - B@dBot // - B@dB0t // // To create and configure a RegexPatternSet , perform the following steps: // - Create a RegexPatternSet. For more information, see CreateRegexPatternSet . // - Use GetChangeToken to get the change token that you provide in the // ChangeToken parameter of an UpdateRegexPatternSet request. // - Submit an UpdateRegexPatternSet request to specify the regular expression // pattern that you want AWS WAF to watch for. // // For more information about how to use the AWS WAF API to allow or block HTTP // requests, see the AWS WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/) // . func (c *Client) UpdateRegexPatternSet(ctx context.Context, params *UpdateRegexPatternSetInput, optFns ...func(*Options)) (*UpdateRegexPatternSetOutput, error) { if params == nil { params = &UpdateRegexPatternSetInput{} } result, metadata, err := c.invokeOperation(ctx, "UpdateRegexPatternSet", params, optFns, c.addOperationUpdateRegexPatternSetMiddlewares) if err != nil { return nil, err } out := result.(*UpdateRegexPatternSetOutput) out.ResultMetadata = metadata return out, nil } type UpdateRegexPatternSetInput struct { // The value returned by the most recent call to GetChangeToken . // // This member is required. ChangeToken *string // The RegexPatternSetId of the RegexPatternSet that you want to update. // RegexPatternSetId is returned by CreateRegexPatternSet and by // ListRegexPatternSets . // // This member is required. RegexPatternSetId *string // An array of RegexPatternSetUpdate objects that you want to insert into or // delete from a RegexPatternSet . // // This member is required. Updates []types.RegexPatternSetUpdate noSmithyDocumentSerde } type UpdateRegexPatternSetOutput struct { // The ChangeToken that you used to submit the UpdateRegexPatternSet request. You // can also use this value to query the status of the request. For more // information, see GetChangeTokenStatus . ChangeToken *string // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationUpdateRegexPatternSetMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson11_serializeOpUpdateRegexPatternSet{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpUpdateRegexPatternSet{}, middleware.After) if err != nil { return err } if err = addSetLoggerMiddleware(stack, options); err != nil { return err } if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { return err } if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { return err } if err = addRetryMiddlewares(stack, options); err != nil { return err } if err = addHTTPSignerV4Middleware(stack, options); err != nil { return err } if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { return err } if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack); err != nil { return err } if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { return err } if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } if err = addOpUpdateRegexPatternSetValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateRegexPatternSet(options.Region), middleware.Before); err != nil { return err } if err = awsmiddleware.AddRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { return err } if err = addResponseErrorMiddleware(stack); err != nil { return err } if err = addRequestResponseLogging(stack, options); err != nil { return err } return nil } func newServiceMetadataMiddleware_opUpdateRegexPatternSet(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "waf-regional", OperationName: "UpdateRegexPatternSet", } }
167
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package wafregional import ( "context" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/wafregional/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // This is AWS WAF Classic documentation. For more information, see AWS WAF Classic (https://docs.aws.amazon.com/waf/latest/developerguide/classic-waf-chapter.html) // in the developer guide. For the latest version of AWS WAF, use the AWS WAFV2 API // and see the AWS WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html) // . With the latest version, AWS WAF has a single set of endpoints for regional // and global use. Inserts or deletes Predicate objects in a Rule . Each Predicate // object identifies a predicate, such as a ByteMatchSet or an IPSet , that // specifies the web requests that you want to allow, block, or count. If you add // more than one predicate to a Rule , a request must match all of the // specifications to be allowed, blocked, or counted. For example, suppose that you // add the following to a Rule : // - A ByteMatchSet that matches the value BadBot in the User-Agent header // - An IPSet that matches the IP address 192.0.2.44 // // You then add the Rule to a WebACL and specify that you want to block requests // that satisfy the Rule . For a request to be blocked, the User-Agent header in // the request must contain the value BadBot and the request must originate from // the IP address 192.0.2.44. To create and configure a Rule , perform the // following steps: // - Create and update the predicates that you want to include in the Rule . // - Create the Rule . See CreateRule . // - Use GetChangeToken to get the change token that you provide in the // ChangeToken parameter of an UpdateRule request. // - Submit an UpdateRule request to add predicates to the Rule . // - Create and update a WebACL that contains the Rule . See CreateWebACL . // // If you want to replace one ByteMatchSet or IPSet with another, you delete the // existing one and add the new one. For more information about how to use the AWS // WAF API to allow or block HTTP requests, see the AWS WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/) // . func (c *Client) UpdateRule(ctx context.Context, params *UpdateRuleInput, optFns ...func(*Options)) (*UpdateRuleOutput, error) { if params == nil { params = &UpdateRuleInput{} } result, metadata, err := c.invokeOperation(ctx, "UpdateRule", params, optFns, c.addOperationUpdateRuleMiddlewares) if err != nil { return nil, err } out := result.(*UpdateRuleOutput) out.ResultMetadata = metadata return out, nil } type UpdateRuleInput struct { // The value returned by the most recent call to GetChangeToken . // // This member is required. ChangeToken *string // The RuleId of the Rule that you want to update. RuleId is returned by CreateRule // and by ListRules . // // This member is required. RuleId *string // An array of RuleUpdate objects that you want to insert into or delete from a // Rule . For more information, see the applicable data types: // - RuleUpdate : Contains Action and Predicate // - Predicate : Contains DataId , Negated , and Type // - FieldToMatch : Contains Data and Type // // This member is required. Updates []types.RuleUpdate noSmithyDocumentSerde } type UpdateRuleOutput struct { // The ChangeToken that you used to submit the UpdateRule request. You can also // use this value to query the status of the request. For more information, see // GetChangeTokenStatus . ChangeToken *string // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationUpdateRuleMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson11_serializeOpUpdateRule{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpUpdateRule{}, middleware.After) if err != nil { return err } if err = addSetLoggerMiddleware(stack, options); err != nil { return err } if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { return err } if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { return err } if err = addRetryMiddlewares(stack, options); err != nil { return err } if err = addHTTPSignerV4Middleware(stack, options); err != nil { return err } if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { return err } if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack); err != nil { return err } if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { return err } if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } if err = addOpUpdateRuleValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateRule(options.Region), middleware.Before); err != nil { return err } if err = awsmiddleware.AddRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { return err } if err = addResponseErrorMiddleware(stack); err != nil { return err } if err = addRequestResponseLogging(stack, options); err != nil { return err } return nil } func newServiceMetadataMiddleware_opUpdateRule(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "waf-regional", OperationName: "UpdateRule", } }
170
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package wafregional import ( "context" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/wafregional/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // This is AWS WAF Classic documentation. For more information, see AWS WAF Classic (https://docs.aws.amazon.com/waf/latest/developerguide/classic-waf-chapter.html) // in the developer guide. For the latest version of AWS WAF, use the AWS WAFV2 API // and see the AWS WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html) // . With the latest version, AWS WAF has a single set of endpoints for regional // and global use. Inserts or deletes ActivatedRule objects in a RuleGroup . You // can only insert REGULAR rules into a rule group. You can have a maximum of ten // rules per rule group. To create and configure a RuleGroup , perform the // following steps: // - Create and update the Rules that you want to include in the RuleGroup . See // CreateRule . // - Use GetChangeToken to get the change token that you provide in the // ChangeToken parameter of an UpdateRuleGroup request. // - Submit an UpdateRuleGroup request to add Rules to the RuleGroup . // - Create and update a WebACL that contains the RuleGroup . See CreateWebACL . // // If you want to replace one Rule with another, you delete the existing one and // add the new one. For more information about how to use the AWS WAF API to allow // or block HTTP requests, see the AWS WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/) // . func (c *Client) UpdateRuleGroup(ctx context.Context, params *UpdateRuleGroupInput, optFns ...func(*Options)) (*UpdateRuleGroupOutput, error) { if params == nil { params = &UpdateRuleGroupInput{} } result, metadata, err := c.invokeOperation(ctx, "UpdateRuleGroup", params, optFns, c.addOperationUpdateRuleGroupMiddlewares) if err != nil { return nil, err } out := result.(*UpdateRuleGroupOutput) out.ResultMetadata = metadata return out, nil } type UpdateRuleGroupInput struct { // The value returned by the most recent call to GetChangeToken . // // This member is required. ChangeToken *string // The RuleGroupId of the RuleGroup that you want to update. RuleGroupId is // returned by CreateRuleGroup and by ListRuleGroups . // // This member is required. RuleGroupId *string // An array of RuleGroupUpdate objects that you want to insert into or delete from // a RuleGroup . You can only insert REGULAR rules into a rule group. // ActivatedRule|OverrideAction applies only when updating or adding a RuleGroup // to a WebACL . In this case you do not use ActivatedRule|Action . For all other // update requests, ActivatedRule|Action is used instead of // ActivatedRule|OverrideAction . // // This member is required. Updates []types.RuleGroupUpdate noSmithyDocumentSerde } type UpdateRuleGroupOutput struct { // The ChangeToken that you used to submit the UpdateRuleGroup request. You can // also use this value to query the status of the request. For more information, // see GetChangeTokenStatus . ChangeToken *string // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationUpdateRuleGroupMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson11_serializeOpUpdateRuleGroup{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpUpdateRuleGroup{}, middleware.After) if err != nil { return err } if err = addSetLoggerMiddleware(stack, options); err != nil { return err } if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { return err } if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { return err } if err = addRetryMiddlewares(stack, options); err != nil { return err } if err = addHTTPSignerV4Middleware(stack, options); err != nil { return err } if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { return err } if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack); err != nil { return err } if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { return err } if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } if err = addOpUpdateRuleGroupValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateRuleGroup(options.Region), middleware.Before); err != nil { return err } if err = awsmiddleware.AddRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { return err } if err = addResponseErrorMiddleware(stack); err != nil { return err } if err = addRequestResponseLogging(stack, options); err != nil { return err } return nil } func newServiceMetadataMiddleware_opUpdateRuleGroup(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "waf-regional", OperationName: "UpdateRuleGroup", } }
161